updated to datasets 4.*
Browse files- README.md +12 -9
- phoneme.py +0 -68
- phoneme.csv → phoneme/train.csv +2 -2
README.md
CHANGED
|
@@ -1,17 +1,20 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
-
- phoneme
|
| 6 |
- tabular_classification
|
| 7 |
- binary_classification
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
- 10k<n<100K
|
| 11 |
-
task_categories: # Full list at https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Types.ts
|
| 12 |
- tabular-classification
|
| 13 |
-
configs:
|
| 14 |
-
- phoneme
|
| 15 |
---
|
| 16 |
# Phoneme
|
| 17 |
The [Phoneme dataset](https://www.openml.org/search?type=data&sort=runs&id=1489&status=active) from the [OpenML repository](https://www.openml.org/).
|
|
|
|
| 1 |
---
|
| 2 |
+
configs:
|
| 3 |
+
- config_name: phoneme
|
| 4 |
+
data_files:
|
| 5 |
+
- path: phoneme/train.csv
|
| 6 |
+
split: train
|
| 7 |
+
default: true
|
| 8 |
+
language: en
|
| 9 |
+
license: unknown
|
| 10 |
+
pretty_name: Phoneme
|
| 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 |
# Phoneme
|
| 20 |
The [Phoneme dataset](https://www.openml.org/search?type=data&sort=runs&id=1489&status=active) from the [OpenML repository](https://www.openml.org/).
|
phoneme.py
DELETED
|
@@ -1,68 +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 = "Phoneme 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/phoneme/raw/main/phoneme.csv"
|
| 19 |
-
}
|
| 20 |
-
features_types_per_config = {
|
| 21 |
-
"phoneme": {
|
| 22 |
-
"V1": datasets.Value("float64"),
|
| 23 |
-
"V2": datasets.Value("float64"),
|
| 24 |
-
"V3": datasets.Value("float64"),
|
| 25 |
-
"V4": datasets.Value("float64"),
|
| 26 |
-
"V5": datasets.Value("float64"),
|
| 27 |
-
"class": datasets.ClassLabel(num_classes=2, names=("no", "yes"))
|
| 28 |
-
}
|
| 29 |
-
|
| 30 |
-
}
|
| 31 |
-
features_per_config = {k: datasets.Features(features_types_per_config[k]) for k in features_types_per_config}
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
class PhonemeConfig(datasets.BuilderConfig):
|
| 35 |
-
def __init__(self, **kwargs):
|
| 36 |
-
super(PhonemeConfig, self).__init__(version=VERSION, **kwargs)
|
| 37 |
-
self.features = features_per_config[kwargs["name"]]
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
class Phoneme(datasets.GeneratorBasedBuilder):
|
| 41 |
-
# dataset versions
|
| 42 |
-
DEFAULT_CONFIG = "phoneme"
|
| 43 |
-
BUILDER_CONFIGS = [
|
| 44 |
-
PhonemeConfig(name="phoneme",
|
| 45 |
-
description="Phoneme for binary classification.")
|
| 46 |
-
]
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
def _info(self):
|
| 50 |
-
info = datasets.DatasetInfo(description=DESCRIPTION, citation=_CITATION, homepage=_HOMEPAGE,
|
| 51 |
-
features=features_per_config[self.config.name])
|
| 52 |
-
|
| 53 |
-
return info
|
| 54 |
-
|
| 55 |
-
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
|
| 56 |
-
downloads = dl_manager.download_and_extract(urls_per_split)
|
| 57 |
-
|
| 58 |
-
return [
|
| 59 |
-
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloads["train"]})
|
| 60 |
-
]
|
| 61 |
-
|
| 62 |
-
def _generate_examples(self, filepath: str):
|
| 63 |
-
data = pandas.read_csv(filepath)
|
| 64 |
-
|
| 65 |
-
for row_id, row in data.iterrows():
|
| 66 |
-
data_row = dict(row)
|
| 67 |
-
|
| 68 |
-
yield row_id, data_row
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phoneme.csv → phoneme/train.csv
RENAMED
|
@@ -1038,7 +1038,7 @@ V1,V2,V3,V4,V5,class
|
|
| 1038 |
-0.550405,0.623264,-0.146488,-0.164566,0.1006,0
|
| 1039 |
-0.508272,1.404845,0.160571,-1.216536,-0.136583,0
|
| 1040 |
-0.813247,-1.277001,-0.648425,-1.051572,1.608611,1
|
| 1041 |
-
0.882855,0.430927,0.016211,-
|
| 1042 |
-0.846216,-1.041877,-0.331471,0.226738,-0.136583,1
|
| 1043 |
-0.273113,1.897503,-1.713163,0.153416,-0.493583,0
|
| 1044 |
-0.756534,-0.892007,0.76028,0.755637,-1.903631,0
|
|
@@ -1488,7 +1488,7 @@ V1,V2,V3,V4,V5,class
|
|
| 1488 |
-0.36832,1.671478,-1.490068,-0.849332,-0.4462,0
|
| 1489 |
-0.788899,-0.291374,-0.152548,1.121198,-0.136583,1
|
| 1490 |
-0.227342,1.552015,-1.476898,-0.797648,-0.367431,0
|
| 1491 |
-
-0.081632,0.290584,-1.172799,-0.64435,
|
| 1492 |
1.672428,-0.71765,-0.946585,-0.361493,-0.221504,0
|
| 1493 |
-0.855447,-0.997939,0.0673,0.341951,0.69448,0
|
| 1494 |
-0.054024,1.240344,0.747875,0.309858,1.314456,1
|
|
|
|
| 1038 |
-0.550405,0.623264,-0.146488,-0.164566,0.1006,0
|
| 1039 |
-0.508272,1.404845,0.160571,-1.216536,-0.136583,0
|
| 1040 |
-0.813247,-1.277001,-0.648425,-1.051572,1.608611,1
|
| 1041 |
+
0.882855,0.430927,0.016211,-7.9e-05,0.54837,0
|
| 1042 |
-0.846216,-1.041877,-0.331471,0.226738,-0.136583,1
|
| 1043 |
-0.273113,1.897503,-1.713163,0.153416,-0.493583,0
|
| 1044 |
-0.756534,-0.892007,0.76028,0.755637,-1.903631,0
|
|
|
|
| 1488 |
-0.36832,1.671478,-1.490068,-0.849332,-0.4462,0
|
| 1489 |
-0.788899,-0.291374,-0.152548,1.121198,-0.136583,1
|
| 1490 |
-0.227342,1.552015,-1.476898,-0.797648,-0.367431,0
|
| 1491 |
+
-0.081632,0.290584,-1.172799,-0.64435,1.1e-05,0
|
| 1492 |
1.672428,-0.71765,-0.946585,-0.361493,-0.221504,0
|
| 1493 |
-0.855447,-0.997939,0.0673,0.341951,0.69448,0
|
| 1494 |
-0.054024,1.240344,0.747875,0.309858,1.314456,1
|