hust / README.md
wangdx25's picture
Add TsFile (converted from odysseywt/HUST)
20d8dd7 verified
|
Raw History Blame Contribute Delete
2.61 kB
---
pretty_name: "HUST Bearing Fault (TsFile)"
modality: timeseries
authors: "odysseywt"
task_categories:
- time-series-forecasting
size_categories:
- 10M<n<100M
tags:
- tsfile
- timeseries
- modality:timeseries
- format:tsfile
configs:
- config_name: default
data_files:
- split: train
path: "hust_*.tsfile"
---
# HUST Bearing Fault (TsFile)
This dataset is an Apache TsFile conversion of
[`odysseywt/HUST`](https://huggingface.co/datasets/odysseywt/HUST).
Modalities: Time-series.
## Overview
- Huazhong University of Science and Technology (HUST) bearing fault dataset.
- Vibration signals across fault types, bearing types, and load conditions.
- Filename/fault/bearing/load metadata are device TAGs; `vibration_raw` is the measurement.
- Converted observations: 48,883,200 rows across 10 TsFile file(s)
- Source format: csv
## TsFile schema
- **Time** — sample index within each segment, stored as INT64 milliseconds.
| Column | Role | Type | Meaning |
|---|---|---|---|
| `Time` | TIME | INT64 (ms) | sample timestamp |
| `filename` | TAG | STRING | source file |
| `fault_type` | TAG | STRING | fault type |
| `bearing_type` | TAG | STRING | bearing type |
| `load_condition` | TAG | STRING | load |
| `segment_idx` | TAG | STRING | — |
| `label` | TAG | STRING | — |
| `segment_id` | TAG | STRING | segment id |
| `vibration_raw` | FIELD | FLOAT | amplitude |
## Conversion notes
- Metadata columns kept as TAGs; `vibration_raw` as FLOAT FIELD.
- Large source split into sharded tsfiles (row-group sharding); source `features` column dropped.
## Source & license
- Original dataset: https://huggingface.co/datasets/odysseywt/HUST
- Author / publisher: odysseywt
- License: mit
## Usage
Install the Apache TsFile Python SDK (`pip install tsfile`) and read a converted file:
```python
from pathlib import Path
from tsfile import TsFileReader
path = Path("hust_1.tsfile")
with TsFileReader(str(path)) as reader:
schemas = reader.get_all_table_schemas()
print("tables:", list(schemas))
table_name = next(iter(schemas))
table = schemas[table_name]
columns = [column.get_column_name() for column in table.get_columns()]
print("columns:", columns)
field_names = [
column.get_column_name()
for column in table.get_columns()
if column.get_column_name() not in {"Time", "time"}
]
if field_names:
with reader.query_table(table_name, field_names[:3], batch_size=1024) as result:
batch = result.read_arrow_batch()
if batch is not None:
print(batch.to_pandas().head())
```