Datasets:
Search is not available for this dataset
target int64 0 86.3k | item_id int64 12.5k 18.1k |
|---|---|
62,280 | 13,078 |
11,340 | 13,078 |
79,920 | 13,078 |
25,140 | 13,078 |
86,100 | 13,078 |
75,840 | 13,078 |
82,620 | 13,078 |
13,800 | 13,078 |
69,000 | 13,078 |
5,460 | 13,078 |
25,020 | 13,078 |
51,840 | 13,078 |
11,940 | 13,078 |
79,200 | 13,078 |
86,280 | 13,078 |
11,580 | 13,078 |
3,960 | 13,078 |
84,120 | 13,078 |
80,700 | 13,078 |
77,700 | 13,078 |
14,100 | 13,078 |
60 | 13,078 |
85,140 | 13,078 |
5,100 | 13,078 |
73,140 | 13,078 |
5,520 | 13,078 |
13,740 | 13,078 |
55,200 | 13,078 |
20,580 | 13,078 |
79,140 | 13,078 |
73,020 | 13,078 |
9,000 | 13,078 |
21,120 | 13,078 |
6,660 | 13,078 |
75,600 | 13,078 |
2,040 | 13,078 |
71,700 | 13,078 |
71,340 | 13,078 |
7,860 | 13,078 |
1,020 | 13,078 |
80,160 | 13,078 |
7,740 | 13,078 |
82,020 | 13,078 |
10,200 | 13,078 |
12,240 | 13,078 |
74,580 | 13,078 |
6,960 | 13,078 |
81,240 | 13,078 |
73,920 | 13,078 |
5,280 | 13,078 |
6,780 | 13,078 |
6,780 | 13,078 |
1,380 | 13,078 |
71,160 | 13,078 |
20,460 | 13,078 |
73,080 | 13,078 |
80,940 | 13,078 |
3,360 | 13,078 |
480 | 13,078 |
72,840 | 13,078 |
13,980 | 13,078 |
60,180 | 13,078 |
13,500 | 13,078 |
11,280 | 13,078 |
81,060 | 13,078 |
1,200 | 13,078 |
83,520 | 13,078 |
60 | 13,078 |
19,980 | 13,078 |
78,420 | 13,078 |
3,480 | 13,078 |
63,720 | 13,078 |
75,420 | 18,102 |
28,680 | 18,102 |
180 | 18,102 |
60 | 18,102 |
60 | 18,102 |
60 | 18,102 |
120 | 18,102 |
120 | 18,102 |
62,520 | 18,102 |
420 | 18,102 |
85,620 | 18,102 |
2,880 | 18,102 |
180 | 18,102 |
74,880 | 18,102 |
14,640 | 18,102 |
72,660 | 18,102 |
2,640 | 18,102 |
84,240 | 18,102 |
11,340 | 18,102 |
13,260 | 18,102 |
67,440 | 18,102 |
120 | 18,102 |
75,840 | 18,102 |
29,280 | 18,102 |
60 | 18,102 |
75,660 | 18,102 |
6,600 | 18,102 |
180 | 18,102 |
End of preview. Expand in Data Studio
next-purchase-day — TsFile
This dataset is a conversion of the HuggingFace dataset
alexgrigoras/next-purchase-day
to the Apache TsFile format. The original CSV
files are also kept here, as in the source repository.
Original dataset
- Source dataset: alexgrigoras/next-purchase-day
- Content: a GluonTS-format purchase time-series — 34 users (
item_id) per split, each with a sequence of purchase times (target, seconds-of-day). Three splits: train / validation / test.
What is in this repository
data/
├── train.tsfile # converted (TsFile)
├── validation.tsfile
└── test.tsfile
df_purchases_train.csv # original CSVs, copied verbatim
df_purchases_validation.csv
df_purchases_test.csv
TsFile storage mapping (table model, per split)
| Role | Column | Type | Notes |
|---|---|---|---|
| TAG | item_id |
STRING | 34 users → 34 devices |
| Time | within-series position index | INT64 | 0, 1, 2, … per series |
| FIELD | target |
INT32 | purchase second-of-day (integer, 0..86340) |
| FIELD | feat_static_cat_0 |
INT64 | per-series static category |
Conversion notes
- GluonTS nested rows expanded to a long table: each source row is one sequence
(start, target[], item_id, feat_static_cat[1], feat_dynamic_real); thetargetarray is exploded so each point becomes one row. - Three splits → three separate TsFiles (train / validation / test); the original split is preserved, not merged.
- TAG =
item_id(34 devices). Time = within-series position index (0, 1, 2, …). The sourcestartfield is a1970-01-01placeholder (not a real timestamp), so the ordinal index is used as the time axis. feat_static_cat→feat_static_cat_0(INT64, the single static category).- Dropped (with consent):
feat_dynamic_real— entirely null across all splits (an empty column carrying no information). No rows dropped (train 2,448 / validation 2,584 / test 2,720 points, matching the source exactly). - The original CSVs (
df_purchases_{train,validation,test}.csv) are kept verbatim.
Usage
from tsfile import TsFileReader
reader = TsFileReader("data/train.tsfile")
schemas = reader.get_all_table_schemas()
tname = next(iter(schemas))
cols = ["item_id", "target", "feat_static_cat_0"]
with reader.query_table(tname, cols, batch_size=65536) as rs:
while (batch := rs.read_arrow_batch()) is not None:
df = batch.to_pandas()
# ... process ...
reader.close()
Citation
@misc{next_purchase_day,
title = {next-purchase-day},
author = {alexgrigoras},
url = {https://huggingface.co/datasets/alexgrigoras/next-purchase-day},
publisher = {Hugging Face}
}
The source HuggingFace dataset does not declare an explicit license.
- Downloads last month
- 80