uoc / README.md
wangdx25's picture
Add TsFile (converted from odysseywt/UoC)
e170e1b verified
|
Raw History Blame Contribute Delete
2.28 kB
---
pretty_name: "UoC Bearing Vibration (TsFile)"
modality: timeseries
authors: "odysseywt"
task_categories:
- time-series-forecasting
size_categories:
- 1M<n<10M
tags:
- tsfile
- timeseries
- modality:timeseries
- format:tsfile
configs:
- config_name: default
data_files:
- split: train
path: "uoc.tsfile"
---
# UoC Bearing Vibration (TsFile)
This dataset is an Apache TsFile conversion of
[`odysseywt/UoC`](https://huggingface.co/datasets/odysseywt/UoC).
Modalities: Time-series.
## Overview
- University of Ottawa bearing vibration dataset for fault diagnosis.
- Each segment stores a raw vibration vector (`features`, 3600 samples).
- `label` (condition) and `segment_id` are device TAGs.
- Converted observations: 3,369,600 rows across 1 TsFile file(s)
- Source format: csv
## TsFile schema
- **Time** — sample index within each segment (0..3599), stored as INT64 milliseconds.
| Column | Role | Type | Meaning |
|---|---|---|---|
| `Time` | TIME | INT64 (ms) | sample timestamp |
| `label` | TAG | STRING | condition label |
| `segment_id` | TAG | STRING | segment id |
| `features` | FIELD | FLOAT | vibration amplitude |
## Conversion notes
- Raw vibration arrays flattened to scalar samples; `label` + `segment_id` are TAGs.
## Source & license
- Original dataset: https://huggingface.co/datasets/odysseywt/UoC
- 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("uoc.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())
```