Datasets:
Witold Wydmański
commited on
Commit
·
f927beb
1
Parent(s):
f8220bf
init
Browse files- .gitattributes +2 -0
- load_script.py +33 -0
- test.csv +3 -0
- train.csv +3 -0
.gitattributes
CHANGED
@@ -52,3 +52,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
52 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
53 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
52 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
53 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
55 |
+
train.csv filter=lfs diff=lfs merge=lfs -text
|
56 |
+
test.csv filter=lfs diff=lfs merge=lfs -text
|
load_script.py
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import datasets
|
2 |
+
from datasets.tasks import TaskTemplate
|
3 |
+
from sklearn.model_selection import train_test_split
|
4 |
+
|
5 |
+
_ORIGIN = "https://archive-beta.ics.uci.edu/dataset/17/breast+cancer+wisconsin+diagnostic"
|
6 |
+
_CITATION = """\
|
7 |
+
Wolberg,William, Street,W. & Mangasarian,Olvi. (1995). Breast Cancer Wisconsin (Diagnostic). UCI Machine Learning Repository. https://doi.org/10.24432/C5DW2B.
|
8 |
+
"""
|
9 |
+
_DESCRIPTION = """\
|
10 |
+
Features are computed from a digitized image of a fine needle aspirate (FNA) of a breast mass. They describe characteristics of the cell nuclei present in the image. A few of the images can be found at http://www.cs.wisc.edu/~street/images/
|
11 |
+
"""
|
12 |
+
|
13 |
+
class WisconsinBreastCancer(datasets.GeneratorBasedBuilder):
|
14 |
+
def _info(self) -> datasets.DatasetInfo:
|
15 |
+
return datasets.DatasetInfo(
|
16 |
+
description=_DESCRIPTION,
|
17 |
+
citation=_CITATION,
|
18 |
+
homepage=_ORIGIN,
|
19 |
+
license="",
|
20 |
+
)
|
21 |
+
|
22 |
+
|
23 |
+
def _split_generators(self, dl_manager):
|
24 |
+
return [
|
25 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": "train.csv"}),
|
26 |
+
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": "test.csv"}),
|
27 |
+
]
|
28 |
+
|
29 |
+
def _generate_examples(self, filepath):
|
30 |
+
with open(filepath, "r") as f:
|
31 |
+
next(f)
|
32 |
+
for key, row in enumerate(f):
|
33 |
+
yield key, {"data": row[:-1], "label": row[-1]}
|
test.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e5ecf51dd6996f85cd6005cfa38974b81d7ba4b84268a0788a923e8cfa026076
|
3 |
+
size 30974
|
train.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3fbd9270a5810db44ac93ffed35107e6d2c71e046fb03c472d591244fd0de073
|
3 |
+
size 92141
|