Datasets:
Upload 2 files
Browse files
README.md
CHANGED
@@ -8,12 +8,11 @@ tags:
|
|
8 |
- multiclass_classification
|
9 |
pretty_name: Musk
|
10 |
size_categories:
|
11 |
-
-
|
12 |
task_categories: # Full list at https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Types.ts
|
13 |
- tabular-classification
|
14 |
configs:
|
15 |
-
-
|
16 |
-
- musk2
|
17 |
---
|
18 |
# Musk
|
19 |
The [Musk dataset](https://archive.ics.uci.edu/ml/datasets/Musk) from the [UCI ML repository](https://archive.ics.uci.edu/ml/datasets).
|
@@ -22,13 +21,12 @@ Census dataset including personal characteristic of a person, and their income t
|
|
22 |
# Configurations and tasks
|
23 |
| **Configuration** | **Task** | **Description** |
|
24 |
|-------------------|---------------------------|------------------------|
|
25 |
-
|
|
26 |
-
| musk2 | Binary classification | Is the molecule a musk?|
|
27 |
|
28 |
|
29 |
# Usage
|
30 |
```python
|
31 |
from datasets import load_dataset
|
32 |
|
33 |
-
dataset = load_dataset("mstz/musk", "
|
34 |
```
|
|
|
8 |
- multiclass_classification
|
9 |
pretty_name: Musk
|
10 |
size_categories:
|
11 |
+
- 100<n<1K
|
12 |
task_categories: # Full list at https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Types.ts
|
13 |
- tabular-classification
|
14 |
configs:
|
15 |
+
- musk
|
|
|
16 |
---
|
17 |
# Musk
|
18 |
The [Musk dataset](https://archive.ics.uci.edu/ml/datasets/Musk) from the [UCI ML repository](https://archive.ics.uci.edu/ml/datasets).
|
|
|
21 |
# Configurations and tasks
|
22 |
| **Configuration** | **Task** | **Description** |
|
23 |
|-------------------|---------------------------|------------------------|
|
24 |
+
| musk | Binary classification | Is the molecule a musk?|
|
|
|
25 |
|
26 |
|
27 |
# Usage
|
28 |
```python
|
29 |
from datasets import load_dataset
|
30 |
|
31 |
+
dataset = load_dataset("mstz/musk", "musk")["train"]
|
32 |
```
|
musk.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
"""Musk: A Census Dataset"""
|
2 |
|
3 |
from typing import List
|
4 |
-
from functools import partial
|
5 |
|
6 |
import datasets
|
7 |
|
@@ -95,84 +94,10 @@ _CITATION = """
|
|
95 |
|
96 |
# Dataset info
|
97 |
urls_per_split = {
|
98 |
-
"
|
99 |
-
"train": "https://huggingface.co/datasets/mstz/musk/raw/main/clean1.data"
|
100 |
-
},
|
101 |
-
"musk2": {
|
102 |
-
"train": "https://huggingface.co/datasets/mstz/musk/raw/main/clean2.data"
|
103 |
-
}
|
104 |
}
|
105 |
features_types_per_config = {
|
106 |
-
"
|
107 |
-
"ray_0": datasets.Value("float64"),
|
108 |
-
"ray_1": datasets.Value("float64"),
|
109 |
-
"ray_2": datasets.Value("float64"),
|
110 |
-
"ray_3": datasets.Value("float64"),
|
111 |
-
"ray_4": datasets.Value("float64"),
|
112 |
-
"ray_5": datasets.Value("float64"),
|
113 |
-
"ray_6": datasets.Value("float64"),
|
114 |
-
"ray_7": datasets.Value("float64"),
|
115 |
-
"ray_8": datasets.Value("float64"),
|
116 |
-
"ray_9": datasets.Value("float64"),
|
117 |
-
"ray_10": datasets.Value("float64"),
|
118 |
-
"ray_11": datasets.Value("float64"),
|
119 |
-
"ray_12": datasets.Value("float64"),
|
120 |
-
"ray_13": datasets.Value("float64"),
|
121 |
-
"ray_14": datasets.Value("float64"),
|
122 |
-
"ray_15": datasets.Value("float64"),
|
123 |
-
"ray_16": datasets.Value("float64"),
|
124 |
-
"ray_17": datasets.Value("float64"),
|
125 |
-
"ray_18": datasets.Value("float64"),
|
126 |
-
"ray_19": datasets.Value("float64"),
|
127 |
-
"ray_20": datasets.Value("float64"),
|
128 |
-
"ray_21": datasets.Value("float64"),
|
129 |
-
"ray_22": datasets.Value("float64"),
|
130 |
-
"ray_23": datasets.Value("float64"),
|
131 |
-
"ray_24": datasets.Value("float64"),
|
132 |
-
"ray_25": datasets.Value("float64"),
|
133 |
-
"ray_26": datasets.Value("float64"),
|
134 |
-
"ray_27": datasets.Value("float64"),
|
135 |
-
"ray_28": datasets.Value("float64"),
|
136 |
-
"ray_29": datasets.Value("float64"),
|
137 |
-
"ray_30": datasets.Value("float64"),
|
138 |
-
"ray_31": datasets.Value("float64"),
|
139 |
-
"ray_32": datasets.Value("float64"),
|
140 |
-
"ray_33": datasets.Value("float64"),
|
141 |
-
"ray_34": datasets.Value("float64"),
|
142 |
-
"ray_35": datasets.Value("float64"),
|
143 |
-
"ray_36": datasets.Value("float64"),
|
144 |
-
"ray_37": datasets.Value("float64"),
|
145 |
-
"ray_38": datasets.Value("float64"),
|
146 |
-
"ray_39": datasets.Value("float64"),
|
147 |
-
"ray_40": datasets.Value("float64"),
|
148 |
-
"ray_41": datasets.Value("float64"),
|
149 |
-
"ray_42": datasets.Value("float64"),
|
150 |
-
"ray_43": datasets.Value("float64"),
|
151 |
-
"ray_44": datasets.Value("float64"),
|
152 |
-
"ray_45": datasets.Value("float64"),
|
153 |
-
"ray_46": datasets.Value("float64"),
|
154 |
-
"ray_47": datasets.Value("float64"),
|
155 |
-
"ray_48": datasets.Value("float64"),
|
156 |
-
"ray_49": datasets.Value("float64"),
|
157 |
-
"ray_50": datasets.Value("float64"),
|
158 |
-
"ray_51": datasets.Value("float64"),
|
159 |
-
"ray_52": datasets.Value("float64"),
|
160 |
-
"ray_53": datasets.Value("float64"),
|
161 |
-
"ray_54": datasets.Value("float64"),
|
162 |
-
"ray_55": datasets.Value("float64"),
|
163 |
-
"ray_56": datasets.Value("float64"),
|
164 |
-
"ray_57": datasets.Value("float64"),
|
165 |
-
"ray_58": datasets.Value("float64"),
|
166 |
-
"ray_59": datasets.Value("float64"),
|
167 |
-
"ray_60": datasets.Value("float64"),
|
168 |
-
"ray_61": datasets.Value("float64"),
|
169 |
-
"oxy_distance": datasets.Value("float64"),
|
170 |
-
"displacement_1": datasets.Value("float64"),
|
171 |
-
"displacement_2": datasets.Value("float64"),
|
172 |
-
"displacement_3": datasets.Value("float64"),
|
173 |
-
"is_musk": datasets.ClassLabel(num_classes=2, names=("no", "yes"))
|
174 |
-
},
|
175 |
-
"musk2": {
|
176 |
"ray_0": datasets.Value("float64"),
|
177 |
"ray_1": datasets.Value("float64"),
|
178 |
"ray_2": datasets.Value("float64"),
|
@@ -253,12 +178,10 @@ class MuskConfig(datasets.BuilderConfig):
|
|
253 |
|
254 |
class Musk(datasets.GeneratorBasedBuilder):
|
255 |
# dataset versions
|
256 |
-
DEFAULT_CONFIG = "
|
257 |
BUILDER_CONFIGS = [
|
258 |
-
MuskConfig(name="
|
259 |
-
description="Musk for binary classification.")
|
260 |
-
MuskConfig(name="musk2",
|
261 |
-
description="Musk for binary classification."),
|
262 |
]
|
263 |
|
264 |
|
@@ -272,7 +195,7 @@ class Musk(datasets.GeneratorBasedBuilder):
|
|
272 |
downloads = dl_manager.download_and_extract(urls_per_split)
|
273 |
|
274 |
return [
|
275 |
-
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloads[
|
276 |
]
|
277 |
|
278 |
def _generate_examples(self, filepath: str):
|
|
|
1 |
"""Musk: A Census Dataset"""
|
2 |
|
3 |
from typing import List
|
|
|
4 |
|
5 |
import datasets
|
6 |
|
|
|
94 |
|
95 |
# Dataset info
|
96 |
urls_per_split = {
|
97 |
+
"train": "https://huggingface.co/datasets/mstz/musk/raw/main/clean1.data"
|
|
|
|
|
|
|
|
|
|
|
98 |
}
|
99 |
features_types_per_config = {
|
100 |
+
"musk": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
"ray_0": datasets.Value("float64"),
|
102 |
"ray_1": datasets.Value("float64"),
|
103 |
"ray_2": datasets.Value("float64"),
|
|
|
178 |
|
179 |
class Musk(datasets.GeneratorBasedBuilder):
|
180 |
# dataset versions
|
181 |
+
DEFAULT_CONFIG = "musk"
|
182 |
BUILDER_CONFIGS = [
|
183 |
+
MuskConfig(name="musk",
|
184 |
+
description="Musk for binary classification.")
|
|
|
|
|
185 |
]
|
186 |
|
187 |
|
|
|
195 |
downloads = dl_manager.download_and_extract(urls_per_split)
|
196 |
|
197 |
return [
|
198 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloads["train"]})
|
199 |
]
|
200 |
|
201 |
def _generate_examples(self, filepath: str):
|