VGalaxies666 commited on
Commit
214432d
·
verified ·
1 Parent(s): 8bb7b3e

Rewrite README in English

Browse files
Files changed (1) hide show
  1. README.md +48 -50
README.md CHANGED
@@ -8,72 +8,70 @@ tags:
8
  pretty_name: rossmann (TsFile format)
9
  ---
10
 
11
- # rossmann — TsFile 格式
12
 
13
- 本目录是 [`autogluon/fev_datasets`](https://huggingface.co/datasets/autogluon/fev_datasets) 中 **rossmann** 子集转换为 [Apache TsFile](https://tsfile.apache.org/) 格式的版本。
14
 
15
- ## 来源与引用
 
 
16
 
17
- - **原始来源**:https://www.kaggle.com/competitions/rossmann-store-sales
18
- - **论文/引用**:[[21]](https://www.kaggle.com/competitions/rossmann-store-sales/overview/citation)
19
- - **统一格式合集**:[autogluon/fev_datasets](https://huggingface.co/datasets/autogluon/fev_datasets)
20
 
21
- > 本数据由外部来源转换为统一格式后再转为 TsFile。许可与引用以**原始来源**为准,我们不对原始数据主张任何权利。除非另有说明,数据仅供研究用途。
22
 
23
- ## 数据统计
24
-
25
- | 频率 | 序列数 | 中位长度 | 观测点数 | 动态列 | 静态列 | 文件 |
26
  |---|---|---|---|---|---|---|
27
- | 1D | 1,115 | 942 | 7,352,310 | 7 | 10 | `1D/1D_1..1D_2.tsfile`(2 片) |
28
  | 1W | 1,115 | 133 | 889,770 | 6 | 10 | `1W/1W.tsfile` |
29
 
30
- ## TsFile 存储模型
31
 
32
- - 每条原始序列(`id`)→ 一个 **device**(TAG 维度)。
33
- - 静态协变量列 → 也作 **TAG**(device 元数据):`Store, StoreType, Assortment, CompetitionDistance, CompetitionOpenSinceMonth, CompetitionOpenSinceYear, Promo2, Promo2SinceWeek, Promo2SinceYear, PromoInterval`。
34
- - 随时间变化的 target / 动态协变量 → **measurement**(FIELD)。
35
- - `timestamp` → `Time`(INT64 毫秒)。
36
- - 表名:rossmann_1D, rossmann_1W。
37
 
38
- ### 列含义
39
 
40
- | 列 | 角色 | TsFile 类型 |
41
  |---|---|---|
42
- | `Time` | Time(时间列) | INT64 |
43
- | `id` | TAG(device 维度) | STRING |
44
- | `Store` | TAG(device 维度) | DOUBLE |
45
- | `StoreType` | TAG(device 维度) | STRING |
46
- | `Assortment` | TAG(device 维度) | STRING |
47
- | `CompetitionDistance` | TAG(device 维度) | DOUBLE |
48
- | `CompetitionOpenSinceMonth` | TAG(device 维度) | DOUBLE |
49
- | `CompetitionOpenSinceYear` | TAG(device 维度) | DOUBLE |
50
- | `Promo2` | TAG(device 维度) | DOUBLE |
51
- | `Promo2SinceWeek` | TAG(device 维度) | DOUBLE |
52
- | `Promo2SinceYear` | TAG(device 维度) | DOUBLE |
53
- | `PromoInterval` | TAG(device 维度) | STRING |
54
- | `DayOfWeek` | FIELD(measurement) | FLOAT |
55
- | `Sales` | FIELD(measurement) | FLOAT |
56
- | `Customers` | FIELD(measurement) | FLOAT |
57
- | `Open` | FIELD(measurement) | FLOAT |
58
- | `Promo` | FIELD(measurement) | FLOAT |
59
- | `StateHoliday` | FIELD(measurement) | STRING |
60
- | `SchoolHoliday` | FIELD(measurement) | FLOAT |
61
-
62
- > 注:有 2230 个原始 id 含非法标识符字符,已规范化为合法 device 名(如 1→_1, 2→_2, 3→_3)。
63
-
64
- ## 转换说明
65
-
66
- - 每行原始数据是一整条序列 `(id, timestamp[], 各 target[])`,纵向打平为长表后写入 TsFile。
67
- - 数值类型按源列自适应:float32→FLOAT、float64→DOUBLE、整数→INT64、bool→BOOLEAN。
68
- - 时间精度:毫秒(INT64)。
69
- - 大表会被工具自动分片为 `<名>_1.tsfile`、`<名>_2.tsfile` …,同属一个逻辑表。
70
-
71
- ## 读取示例
72
 
73
  ```python
74
  from tsfile import TsFileReader
75
 
76
  reader = TsFileReader("1D/1D.tsfile")
77
  schemas = reader.get_all_table_schemas()
78
- # 表名:rossmann_1D;列见下方"列含义"。
79
  ```
 
8
  pretty_name: rossmann (TsFile format)
9
  ---
10
 
11
+ # rossmann (TsFile format)
12
 
13
+ ## Source and Citation
14
 
15
+ - **Original source**: https://www.kaggle.com/competitions/rossmann-store-sales
16
+ - **Paper / citation**: [[21]](https://www.kaggle.com/competitions/rossmann-store-sales/overview/citation)
17
+ - **Unified source collection**: [autogluon/fev_datasets](https://huggingface.co/datasets/autogluon/fev_datasets)
18
 
19
+ > This dataset was converted from external source data into a unified forecasting format and then into TsFile. Licensing and citation requirements follow the original source. We do not claim ownership of the original data. Unless otherwise stated, the data is intended for research use.
 
 
20
 
21
+ ## Dataset Statistics
22
 
23
+ | Frequency | Number of series | Median length | Observations | Dynamic columns | Static columns | Files |
 
 
24
  |---|---|---|---|---|---|---|
25
+ | 1D | 1,115 | 942 | 7,352,310 | 7 | 10 | `1D/1D_1..1D_2.tsfile` (2 shards) |
26
  | 1W | 1,115 | 133 | 889,770 | 6 | 10 | `1W/1W.tsfile` |
27
 
28
+ ## TsFile Storage Model
29
 
30
+ - Each original series (`id`) is stored as one TsFile **device** (TAG dimension).
31
+ - Static covariate columns are also stored as **TAGs** (device metadata): `Store, StoreType, Assortment, CompetitionDistance, CompetitionOpenSinceMonth, CompetitionOpenSinceYear, Promo2, Promo2SinceWeek, Promo2SinceYear, PromoInterval`.
32
+ - Time-varying targets and dynamic covariates are stored as **measurements** (FIELDs).
33
+ - `timestamp` is mapped to `Time` as INT64 milliseconds.
34
+ - Table names: rossmann_1D, rossmann_1W.
35
 
36
+ ### Column Schema
37
 
38
+ | Column | Role | TsFile type |
39
  |---|---|---|
40
+ | `Time` | Time column | INT64 |
41
+ | `id` | TAG (device dimension) | STRING |
42
+ | `Store` | TAG (device dimension) | DOUBLE |
43
+ | `StoreType` | TAG (device dimension) | STRING |
44
+ | `Assortment` | TAG (device dimension) | STRING |
45
+ | `CompetitionDistance` | TAG (device dimension) | DOUBLE |
46
+ | `CompetitionOpenSinceMonth` | TAG (device dimension) | DOUBLE |
47
+ | `CompetitionOpenSinceYear` | TAG (device dimension) | DOUBLE |
48
+ | `Promo2` | TAG (device dimension) | DOUBLE |
49
+ | `Promo2SinceWeek` | TAG (device dimension) | DOUBLE |
50
+ | `Promo2SinceYear` | TAG (device dimension) | DOUBLE |
51
+ | `PromoInterval` | TAG (device dimension) | STRING |
52
+ | `DayOfWeek` | FIELD (measurement) | FLOAT |
53
+ | `Sales` | FIELD (measurement) | FLOAT |
54
+ | `Customers` | FIELD (measurement) | FLOAT |
55
+ | `Open` | FIELD (measurement) | FLOAT |
56
+ | `Promo` | FIELD (measurement) | FLOAT |
57
+ | `StateHoliday` | FIELD (measurement) | STRING |
58
+ | `SchoolHoliday` | FIELD (measurement) | FLOAT |
59
+
60
+ > Note: 2230 original `id` values contained invalid identifier characters and were normalized to valid device names, for example 1→_1, 2→_2, 3→_3.
61
+
62
+ ## Conversion Notes
63
+
64
+ - Each original row stores one complete series `(id, timestamp[], target and dynamic arrays)`. The converter flattens these nested rows into a long table before writing TsFile.
65
+ - Numeric types are inferred from the source columns, for example float32 to FLOAT, float64 to DOUBLE, integers to INT64, and bool to BOOLEAN.
66
+ - Time precision: milliseconds (INT64).
67
+ - Large tables may be automatically sharded as `<name>_1.tsfile`, `<name>_2.tsfile`, and so on. These shards belong to the same logical table.
68
+
69
+ ## Reading Example
70
 
71
  ```python
72
  from tsfile import TsFileReader
73
 
74
  reader = TsFileReader("1D/1D.tsfile")
75
  schemas = reader.get_all_table_schemas()
76
+ # Table name: rossmann_1D; see \"Column Schema\" below.
77
  ```