fev_datasets / rossmann /README.md
smilegeng's picture
Squash history to drop stale LFS blobs (re-encoded TsFiles only)
17df3d8
|
Raw
History Blame Contribute Delete
3.45 kB
---
license: other
task_categories:
- time-series-forecasting
tags:
- time-series
- tsfile
pretty_name: rossmann (TsFile format)
---
# rossmann — TsFile 格式
本目录是 [`autogluon/fev_datasets`](https://huggingface.co/datasets/autogluon/fev_datasets) 中 **rossmann** 子集转换为 [Apache TsFile](https://tsfile.apache.org/) 格式的版本。
## 来源与引用
- **原始来源**:https://www.kaggle.com/competitions/rossmann-store-sales
- **论文/引用**:[[21]](https://www.kaggle.com/competitions/rossmann-store-sales/overview/citation)
- **统一格式合集**:[autogluon/fev_datasets](https://huggingface.co/datasets/autogluon/fev_datasets)
> 本数据由外部来源转换为统一格式后再转为 TsFile。许可与引用以**原始来源**为准,我们不对原始数据主张任何权利。除非另有说明,数据仅供研究用途。
## 数据统计
| 频率 | 序列数 | 中位长度 | 观测点数 | 动态列 | 静态列 | 文件 |
|---|---|---|---|---|---|---|
| 1D | 1,115 | 942 | 7,352,310 | 7 | 10 | `1D/1D_1..1D_2.tsfile`(2 片) |
| 1W | 1,115 | 133 | 889,770 | 6 | 10 | `1W/1W.tsfile` |
## TsFile 存储模型
- 每条原始序列(`id`)→ 一个 **device**(TAG 维度)。
- 静态协变量列 → 也作 **TAG**(device 元数据):`Store, StoreType, Assortment, CompetitionDistance, CompetitionOpenSinceMonth, CompetitionOpenSinceYear, Promo2, Promo2SinceWeek, Promo2SinceYear, PromoInterval`
- 随时间变化的 target / 动态协变量 → **measurement**(FIELD)。
- `timestamp``Time`(INT64 毫秒)。
- 表名:rossmann_1D, rossmann_1W。
### 列含义
| 列 | 角色 | TsFile 类型 |
|---|---|---|
| `Time` | Time(时间列) | INT64 |
| `id` | TAG(device 维度) | STRING |
| `Store` | TAG(device 维度) | DOUBLE |
| `StoreType` | TAG(device 维度) | STRING |
| `Assortment` | TAG(device 维度) | STRING |
| `CompetitionDistance` | TAG(device 维度) | DOUBLE |
| `CompetitionOpenSinceMonth` | TAG(device 维度) | DOUBLE |
| `CompetitionOpenSinceYear` | TAG(device 维度) | DOUBLE |
| `Promo2` | TAG(device 维度) | DOUBLE |
| `Promo2SinceWeek` | TAG(device 维度) | DOUBLE |
| `Promo2SinceYear` | TAG(device 维度) | DOUBLE |
| `PromoInterval` | TAG(device 维度) | STRING |
| `DayOfWeek` | FIELD(measurement) | FLOAT |
| `Sales` | FIELD(measurement) | FLOAT |
| `Customers` | FIELD(measurement) | FLOAT |
| `Open` | FIELD(measurement) | FLOAT |
| `Promo` | FIELD(measurement) | FLOAT |
| `StateHoliday` | FIELD(measurement) | STRING |
| `SchoolHoliday` | FIELD(measurement) | FLOAT |
> 注:有 2230 个原始 id 含非法标识符字符,已规范化为合法 device 名(如 1→_1, 2→_2, 3→_3)。
## 转换说明
- 每行原始数据是一整条序列 `(id, timestamp[], 各 target[])`,纵向打平为长表后写入 TsFile。
- 数值类型按源列自适应:float32→FLOAT、float64→DOUBLE、整数→INT64、bool→BOOLEAN。
- 时间精度:毫秒(INT64)。
- 大表会被工具自动分片为 `<名>_1.tsfile`、`<名>_2.tsfile` …,同属一个逻辑表。
## 读取示例
```python
from tsfile import TsFileReader
reader = TsFileReader("1D/1D.tsfile")
schemas = reader.get_all_table_schemas()
# 表名:rossmann_1D;列见下方"列含义"。
```