Datasets:

dysts / README.md
wangdx25's picture
Add TsFile (converted from williamgilpin/dysts)
52b6f3d verified
|
Raw History Blame Contribute Delete
5.09 kB
---
pretty_name: "Dysts Chaotic Dynamical-System Trajectories (TsFile)"
modality: timeseries
license: cc-by-4.0
authors: "William Gilpin"
task_categories:
- time-series-forecasting
size_categories:
- 1M<n<10M
tags:
- tsfile
- timeseries
- modality:timeseries
- format:tsfile
- dynamical-systems
- chaotic-systems
- simulation
configs:
- config_name: coarse
data_files:
- split: coarse
path: "dysts_coarse_*.tsfile"
- config_name: medium
data_files:
- split: medium
path: "dysts_medium_*.tsfile"
- config_name: fine
data_files:
- split: fine
path: "dysts_fine_*.tsfile"
---
# Dysts Chaotic Dynamical-System Trajectories (TsFile)
This dataset is the Apache TsFile conversion of
[`williamgilpin/dysts`](https://huggingface.co/datasets/williamgilpin/dysts),
a collection of simulated trajectories from named chaotic and nonlinear
dynamical systems. See the source papers [arXiv:2110.05266](https://arxiv.org/abs/2110.05266)
and [arXiv:2303.08011](https://arxiv.org/abs/2303.08011).
Modalities: Time-series.
## Overview
- Source revision: `5d305abb3c9010e36ca6a3e6c967b72932f6cca9`
- Source files: `coarse/*.csv`, `medium/*.csv`, and `fine/*.csv`
- Trajectories/files: 352 total (117 coarse, 118 medium, 117 fine)
- Points per trajectory: 10,000
- Converted rows: 3,520,000 total (1,170,000 coarse, 1,180,000 medium,
1,170,000 fine)
- License: `cc-by-4.0`
Each CSV contains a `time` column and a variable number of numeric channels.
The source channel names are commonly `x0`, ` x1`, ...; the leading whitespace
is normalized during conversion. Different systems may have different channel
counts, so each output table uses a union schema.
## TsFile files and schema
The converter emits one logical table per source resolution. Each logical
table is split into two TsFile shards by the import tool:
| File | Table | Rows | Size (bytes) |
|---|---|---:|---:|
| `dysts_coarse_1.tsfile` | `dysts_coarse` | 1,048,576 | 29,477,332 |
| `dysts_coarse_2.tsfile` | `dysts_coarse` | 121,424 | 3,581,515 |
| `dysts_medium_1.tsfile` | `dysts_medium` | 1,048,576 | 30,225,699 |
| `dysts_medium_2.tsfile` | `dysts_medium` | 131,424 | 3,893,846 |
| `dysts_fine_1.tsfile` | `dysts_fine` | 1,048,576 | 30,972,948 |
| `dysts_fine_2.tsfile` | `dysts_fine` | 121,424 | 3,527,556 |
Every table has the following common columns:
| Column | Role | Type | Meaning |
|---|---|---|---|
| `Time` | TIME | INT64 (ms) | Rounded source `time * 1000`; source values run from 0 to 9,999 |
| `granularity` | TAG | STRING | `coarse`, `medium`, or `fine` |
| `system` | TAG | STRING | System name parsed from the source filename |
| `x0` through `x9` | FIELD | DOUBLE | Numeric trajectory channels; unavailable channels are null |
The actual number of populated channel fields depends on the system. The
union schema keeps the maximum observed channel names (`x0` through `x9`) in each
resolution table.
## Conversion notes
- Source `time` is interpreted as seconds and converted to integer-millisecond
`Time` by rounding. It is not retained as a second field.
- The filename suffix (`_coarse`, `_medium`, `_fine`) supplies the
`granularity` TAG; the remaining filename stem supplies `system`.
- Channel names are trimmed and sanitized to TsFile-safe identifiers. Numeric
values are copied without scaling. Missing channels in a system are null;
no values are imputed and no trajectory rows are dropped.
- Files are processed deterministically and sorted by `granularity`, `system`,
and `Time`. Each source system has unique `(system, Time)` keys within its
resolution.
## Read example
```python
from tsfile import TsFileReader
path = "dysts_coarse_1.tsfile"
with TsFileReader(path) as reader:
with reader.query_table(
"dysts_coarse",
["x0", "x1", "x2"],
batch_size=4096,
) as result:
batch = result.read_arrow_batch()
if batch is not None:
print(batch.to_pandas().head())
```
## Source & license
- Original dataset: https://huggingface.co/datasets/williamgilpin/dysts
- Author / publisher: William Gilpin
- Papers: https://arxiv.org/abs/2110.05266 and https://arxiv.org/abs/2303.08011
- License: CC-BY-4.0
## 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("dysts_coarse_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())
```