wangdx25 commited on
Commit
fb445ce
·
verified ·
1 Parent(s): e6139e6

Add TsFile (converted from odysseywt/CWRU)

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +86 -0
  3. cwru.tsfile +3 -0
.gitattributes CHANGED
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ cwru.tsfile filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: "CWRU Bearing Fault (TsFile)"
3
+ modality: timeseries
4
+ authors: "odysseywt"
5
+ task_categories:
6
+ - time-series-forecasting
7
+ size_categories:
8
+ - 100K<n<1M
9
+ tags:
10
+ - tsfile
11
+ - timeseries
12
+ - modality:timeseries
13
+ - format:tsfile
14
+ configs:
15
+ - config_name: default
16
+ data_files:
17
+ - split: train
18
+ path: "cwru.tsfile"
19
+ ---
20
+
21
+ # CWRU Bearing Fault (TsFile)
22
+
23
+ This dataset is an Apache TsFile conversion of
24
+ [`odysseywt/CWRU`](https://huggingface.co/datasets/odysseywt/CWRU).
25
+
26
+ Modalities: Time-series.
27
+
28
+ ## Overview
29
+
30
+ - Case Western Reserve University (CWRU) bearing fault benchmark.
31
+ - Each segment stores 17 extracted features (`all_features`).
32
+ - Fault size, label, and segment are device TAGs.
33
+
34
+ - Converted observations: 370,362 rows across 1 TsFile file(s)
35
+ - Source format: csv
36
+
37
+ ## TsFile schema
38
+
39
+ - **Time** — sample index within each segment, stored as INT64 milliseconds.
40
+
41
+ | Column | Role | Type | Meaning |
42
+ |---|---|---|---|
43
+ | `Time` | TIME | INT64 (ms) | sample timestamp |
44
+ | `fault_size` | TAG | STRING | fault size |
45
+ | `label` | TAG | STRING | condition label |
46
+ | `segment_idx` | TAG | STRING | — |
47
+ | `segment_id` | TAG | STRING | segment id |
48
+ | `all_features` | FIELD | FLOAT | feature value |
49
+
50
+ ## Conversion notes
51
+
52
+ - Extracted features flattened to scalar samples; fault_size/label/segment_id are TAGs.
53
+
54
+ ## Source & license
55
+
56
+ - Original dataset: https://huggingface.co/datasets/odysseywt/CWRU
57
+ - Author / publisher: odysseywt
58
+ - License: mit
59
+
60
+ ## Usage
61
+
62
+ Install the Apache TsFile Python SDK (`pip install tsfile`) and read a converted file:
63
+
64
+ ```python
65
+ from pathlib import Path
66
+ from tsfile import TsFileReader
67
+
68
+ path = Path("cwru.tsfile")
69
+ with TsFileReader(str(path)) as reader:
70
+ schemas = reader.get_all_table_schemas()
71
+ print("tables:", list(schemas))
72
+ table_name = next(iter(schemas))
73
+ table = schemas[table_name]
74
+ columns = [column.get_column_name() for column in table.get_columns()]
75
+ print("columns:", columns)
76
+ field_names = [
77
+ column.get_column_name()
78
+ for column in table.get_columns()
79
+ if column.get_column_name() not in {"Time", "time"}
80
+ ]
81
+ if field_names:
82
+ with reader.query_table(table_name, field_names[:3], batch_size=1024) as result:
83
+ batch = result.read_arrow_batch()
84
+ if batch is not None:
85
+ print(batch.to_pandas().head())
86
+ ```
cwru.tsfile ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dfb7ff7bc27eaf52373be454601eb017230e57f7b7d13ee4671c64ef4541320a
3
+ size 6565082