Datasets:
Upload folder using huggingface_hub
Browse files- README.md +0 -32
- configs.json +38 -0
- time_mmd_multi.py +10 -13
README.md
CHANGED
@@ -1,34 +1,2 @@
|
|
1 |
-
---
|
2 |
-
pretty_name: Time-MMD (multi-config)
|
3 |
-
tags:
|
4 |
-
- time-series
|
5 |
-
- forecasting
|
6 |
-
- multivariate
|
7 |
-
- multimodal
|
8 |
-
task_categories:
|
9 |
-
- time-series-forecasting
|
10 |
-
language:
|
11 |
-
- en
|
12 |
-
license: mit
|
13 |
-
annotations_creators:
|
14 |
-
- no-annotation
|
15 |
-
source_datasets:
|
16 |
-
- original
|
17 |
-
multilinguality: monolingual
|
18 |
-
size_categories:
|
19 |
-
- 1K<n<10K
|
20 |
-
---
|
21 |
-
|
22 |
-
# Time-MMD Multi-Config
|
23 |
-
|
24 |
-
Each subfolder under `data/` is a config (e.g., `Economy_predLen_24`, `Health_predLen_48`, ...).
|
25 |
-
Load one with:
|
26 |
-
|
27 |
-
```python
|
28 |
-
from datasets import load_dataset
|
29 |
-
ds = load_dataset("your-username/time-mmd-multiconfig", name="<config_name>")
|
30 |
-
print(ds) # DatasetDict with train/validation/test
|
31 |
-
|
32 |
-
|
33 |
# Time-MMD Multi-Config
|
34 |
Each subfolder in `data/` is a config.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Time-MMD Multi-Config
|
2 |
Each subfolder in `data/` is a config.
|
configs.json
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
"newyork_aqi_day_predLen_192",
|
3 |
+
"newyork_aqi_day_predLen_336",
|
4 |
+
"newyork_aqi_day_predLen_48",
|
5 |
+
"newyork_aqi_day_predLen_96",
|
6 |
+
"unadj_unemploymentrate_all_processed_predLen_10",
|
7 |
+
"unadj_unemploymentrate_all_processed_predLen_12",
|
8 |
+
"unadj_unemploymentrate_all_processed_predLen_6",
|
9 |
+
"unadj_unemploymentrate_all_processed_predLen_8",
|
10 |
+
"us_femagrant_month_predLen_10",
|
11 |
+
"us_femagrant_month_predLen_12",
|
12 |
+
"us_femagrant_month_predLen_6",
|
13 |
+
"us_femagrant_month_predLen_8",
|
14 |
+
"us_fluratio_week_predLen_12",
|
15 |
+
"us_fluratio_week_predLen_24",
|
16 |
+
"us_fluratio_week_predLen_36",
|
17 |
+
"us_fluratio_week_predLen_48",
|
18 |
+
"us_gasolineprice_week_predLen_12",
|
19 |
+
"us_gasolineprice_week_predLen_24",
|
20 |
+
"us_gasolineprice_week_predLen_36",
|
21 |
+
"us_gasolineprice_week_predLen_48",
|
22 |
+
"us_precipitation_month_predLen_10",
|
23 |
+
"us_precipitation_month_predLen_12",
|
24 |
+
"us_precipitation_month_predLen_6",
|
25 |
+
"us_precipitation_month_predLen_8",
|
26 |
+
"us_retailbroilercomposite_month_predLen_10",
|
27 |
+
"us_retailbroilercomposite_month_predLen_12",
|
28 |
+
"us_retailbroilercomposite_month_predLen_6",
|
29 |
+
"us_retailbroilercomposite_month_predLen_8",
|
30 |
+
"us_tradebalance_month_predLen_10",
|
31 |
+
"us_tradebalance_month_predLen_12",
|
32 |
+
"us_tradebalance_month_predLen_6",
|
33 |
+
"us_tradebalance_month_predLen_8",
|
34 |
+
"us_vmt_month_predLen_10",
|
35 |
+
"us_vmt_month_predLen_12",
|
36 |
+
"us_vmt_month_predLen_6",
|
37 |
+
"us_vmt_month_predLen_8"
|
38 |
+
]
|
time_mmd_multi.py
CHANGED
@@ -7,14 +7,11 @@ _DESCRIPTION = (
|
|
7 |
_CITATION = ""
|
8 |
|
9 |
|
10 |
-
def
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
return
|
15 |
-
return sorted(
|
16 |
-
d for d in os.listdir(data_root) if os.path.isdir(os.path.join(data_root, d))
|
17 |
-
)
|
18 |
|
19 |
|
20 |
class _Cfg(datasets.BuilderConfig):
|
@@ -25,7 +22,7 @@ class _Cfg(datasets.BuilderConfig):
|
|
25 |
|
26 |
class TimeMMDMulti(datasets.GeneratorBasedBuilder):
|
27 |
BUILDER_CONFIGS = [
|
28 |
-
_Cfg(name=n, description=f"Subset: {n}") for n in
|
29 |
]
|
30 |
DEFAULT_CONFIG_NAME = BUILDER_CONFIGS[0].name if BUILDER_CONFIGS else None
|
31 |
|
@@ -51,19 +48,19 @@ class TimeMMDMulti(datasets.GeneratorBasedBuilder):
|
|
51 |
def _split_generators(self, dl_manager):
|
52 |
root = os.path.dirname(__file__)
|
53 |
d = os.path.join(root, "data", self.config.subdir)
|
54 |
-
|
55 |
"train": os.path.join(d, "train.jsonl"),
|
56 |
"validation": os.path.join(d, "validation.jsonl"),
|
57 |
"test": os.path.join(d, "test.jsonl"),
|
58 |
}
|
59 |
gens = []
|
60 |
-
for name,
|
61 |
-
if os.path.exists(
|
62 |
gens.append(
|
63 |
datasets.SplitGenerator(
|
64 |
name=getattr(datasets.Split, name.upper()),
|
65 |
gen_kwargs={
|
66 |
-
"filepath":
|
67 |
"split_name": name,
|
68 |
"domain": self.config.subdir,
|
69 |
},
|
|
|
7 |
_CITATION = ""
|
8 |
|
9 |
|
10 |
+
def _config_names():
|
11 |
+
here = os.path.dirname(__file__)
|
12 |
+
cfg_path = os.path.join(here, "configs.json")
|
13 |
+
with open(cfg_path, "r", encoding="utf-8") as f:
|
14 |
+
return json.load(f)
|
|
|
|
|
|
|
15 |
|
16 |
|
17 |
class _Cfg(datasets.BuilderConfig):
|
|
|
22 |
|
23 |
class TimeMMDMulti(datasets.GeneratorBasedBuilder):
|
24 |
BUILDER_CONFIGS = [
|
25 |
+
_Cfg(name=n, description=f"Subset: {n}") for n in _config_names()
|
26 |
]
|
27 |
DEFAULT_CONFIG_NAME = BUILDER_CONFIGS[0].name if BUILDER_CONFIGS else None
|
28 |
|
|
|
48 |
def _split_generators(self, dl_manager):
|
49 |
root = os.path.dirname(__file__)
|
50 |
d = os.path.join(root, "data", self.config.subdir)
|
51 |
+
paths = {
|
52 |
"train": os.path.join(d, "train.jsonl"),
|
53 |
"validation": os.path.join(d, "validation.jsonl"),
|
54 |
"test": os.path.join(d, "test.jsonl"),
|
55 |
}
|
56 |
gens = []
|
57 |
+
for name, p in paths.items():
|
58 |
+
if os.path.exists(p):
|
59 |
gens.append(
|
60 |
datasets.SplitGenerator(
|
61 |
name=getattr(datasets.Split, name.upper()),
|
62 |
gen_kwargs={
|
63 |
+
"filepath": p,
|
64 |
"split_name": name,
|
65 |
"domain": self.config.subdir,
|
66 |
},
|