mstz commited on
Commit
4825354
·
1 Parent(s): 446b55c

updated to datasets 4.*

Browse files
Files changed (3) hide show
  1. README.md +11 -9
  2. house16.py +0 -79
  3. house_16H.csv → house16/train.csv +0 -0
README.md CHANGED
@@ -1,18 +1,20 @@
1
  ---
2
- language:
3
- - en
 
 
 
 
 
 
 
 
4
  tags:
5
- - house16
6
  - tabular_classification
7
  - binary_classification
8
- pretty_name: House16
9
- size_categories:
10
- - 10k<n<100K
11
  task_categories:
12
  - tabular-classification
13
- configs:
14
- - house16
15
- license: cc
16
  ---
17
  # House16
18
  The [House16 dataset](https://www.openml.org/search?type=data&sort=runs&id=821&status=active) from the [OpenML repository](https://www.openml.org/).
 
1
  ---
2
+ configs:
3
+ - config_name: house16
4
+ data_files:
5
+ - path: house16/train.csv
6
+ split: train
7
+ default: true
8
+ language: en
9
+ license: cc
10
+ pretty_name: House16
11
+ size_categories: 1M<n<10M
12
  tags:
 
13
  - tabular_classification
14
  - binary_classification
15
+ - multiclass_classification
 
 
16
  task_categories:
17
  - tabular-classification
 
 
 
18
  ---
19
  # House16
20
  The [House16 dataset](https://www.openml.org/search?type=data&sort=runs&id=821&status=active) from the [OpenML repository](https://www.openml.org/).
house16.py DELETED
@@ -1,79 +0,0 @@
1
- from typing import List
2
-
3
- import datasets
4
-
5
- import pandas
6
-
7
-
8
- VERSION = datasets.Version("1.0.0")
9
-
10
-
11
- DESCRIPTION = "House16 dataset from the OpenML repository."
12
- _HOMEPAGE = "https://www.openml.org/search?type=data&sort=runs&id=722&status=active"
13
- _URLS = ("https://www.openml.org/search?type=data&sort=runs&id=722&status=active")
14
- _CITATION = """"""
15
-
16
- # Dataset info
17
- urls_per_split = {
18
- "train": "https://huggingface.co/datasets/mstz/house16/raw/main/house_16H.csv"
19
- }
20
- features_types_per_config = {
21
- "house16": {
22
- "P1": datasets.Value("int64"),
23
- "P5p1": datasets.Value("float64"),
24
- "P6p2": datasets.Value("float64"),
25
- "P11p4": datasets.Value("float64"),
26
- "P14p9": datasets.Value("float64"),
27
- "P15p1": datasets.Value("float64"),
28
- "P15p3": datasets.Value("float64"),
29
- "P16p2": datasets.Value("float64"),
30
- "P18p2": datasets.Value("float64"),
31
- "P27p4": datasets.Value("float64"),
32
- "H2p2": datasets.Value("float64"),
33
- "H8p2": datasets.Value("float64"),
34
- "H10p1": datasets.Value("float64"),
35
- "H13p1": datasets.Value("float64"),
36
- "H18pA": datasets.Value("float64"),
37
- "H40p4": datasets.Value("float64"),
38
- "class": datasets.ClassLabel(num_classes=2, names=("no", "yes"))
39
- }
40
-
41
- }
42
- features_per_config = {k: datasets.Features(features_types_per_config[k]) for k in features_types_per_config}
43
-
44
-
45
- class House16Config(datasets.BuilderConfig):
46
- def __init__(self, **kwargs):
47
- super(House16Config, self).__init__(version=VERSION, **kwargs)
48
- self.features = features_per_config[kwargs["name"]]
49
-
50
-
51
- class House16(datasets.GeneratorBasedBuilder):
52
- # dataset versions
53
- DEFAULT_CONFIG = "house16"
54
- BUILDER_CONFIGS = [
55
- House16Config(name="house16",
56
- description="House16 for binary classification.")
57
- ]
58
-
59
-
60
- def _info(self):
61
- info = datasets.DatasetInfo(description=DESCRIPTION, citation=_CITATION, homepage=_HOMEPAGE,
62
- features=features_per_config[self.config.name])
63
-
64
- return info
65
-
66
- def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
67
- downloads = dl_manager.download_and_extract(urls_per_split)
68
-
69
- return [
70
- datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloads["train"]})
71
- ]
72
-
73
- def _generate_examples(self, filepath: str):
74
- data = pandas.read_csv(filepath)
75
-
76
- for row_id, row in data.iterrows():
77
- data_row = dict(row)
78
-
79
- yield row_id, data_row
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
house_16H.csv → house16/train.csv RENAMED
The diff for this file is too large to render. See raw diff