mstz commited on
Commit
b331d80
1 Parent(s): 30716ca

Upload 3 files

Browse files
Files changed (3) hide show
  1. README.md +28 -1
  2. mammographic_masses.data +961 -0
  3. mammography.py +123 -0
README.md CHANGED
@@ -1,3 +1,30 @@
1
  ---
2
- license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - mammography
6
+ - tabular_classification
7
+ - binary_classification
8
+ pretty_name: Mammography
9
+ size_categories:
10
+ - 100<n<1K
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
+ - mammography
15
  ---
16
+ # Mammography
17
+ The [Mammography dataset](https://archive.ics.uci.edu/ml/datasets/Mammography) from the [UCI ML repository](https://archive.ics.uci.edu/ml/datasets).
18
+
19
+ # Configurations and tasks
20
+ | **Configuration** | **Task** | **Description** |
21
+ |-------------------|---------------------------|------------------------|
22
+ | mammography | Binary classification | Is the lesion benign? |
23
+
24
+
25
+ # Usage
26
+ ```python
27
+ from datasets import load_dataset
28
+
29
+ dataset = load_dataset("mstz/mammography", "mammography")["train"]
30
+ ```
mammographic_masses.data ADDED
@@ -0,0 +1,961 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
89
+ 4,63,1,1,?,0
90
+ 5,62,1,5,3,1
91
+ 4,73,3,4,3,1
92
+ 4,80,4,4,3,1
93
+ 4,67,1,1,?,0
94
+ 5,59,2,1,3,1
95
+ 5,60,1,?,3,0
96
+ 5,54,4,4,3,1
97
+ 4,40,1,1,?,0
98
+ 4,47,2,1,?,0
99
+ 5,62,4,4,3,0
100
+ 4,33,2,1,3,0
101
+ 5,59,2,?,?,0
102
+ 4,65,2,?,?,0
103
+ 4,58,4,4,?,0
104
+ 4,29,2,?,?,0
105
+ 4,58,1,1,?,0
106
+ 4,54,1,1,?,0
107
+ 4,44,1,1,?,1
108
+ 3,34,2,1,?,0
109
+ 4,57,1,1,3,0
110
+ 5,33,4,4,?,1
111
+ 4,45,4,4,3,0
112
+ 5,71,4,4,3,1
113
+ 5,59,4,4,2,0
114
+ 4,56,2,1,?,0
115
+ 4,40,3,4,?,0
116
+ 4,56,1,1,3,0
117
+ 4,45,2,1,?,0
118
+ 4,57,2,1,2,0
119
+ 5,55,3,4,3,1
120
+ 5,84,4,5,3,0
121
+ 5,51,4,4,3,1
122
+ 4,43,1,1,?,0
123
+ 4,24,2,1,2,0
124
+ 4,66,1,1,3,0
125
+ 5,33,4,4,3,0
126
+ 4,59,4,3,2,0
127
+ 4,76,2,3,?,0
128
+ 4,40,1,1,?,0
129
+ 4,52,?,4,?,0
130
+ 5,40,4,5,3,1
131
+ 5,67,4,4,3,1
132
+ 5,75,4,3,3,1
133
+ 5,86,4,4,3,0
134
+ 4,60,2,?,?,0
135
+ 5,66,4,4,3,1
136
+ 5,46,4,5,3,1
137
+ 4,59,4,4,3,1
138
+ 5,65,4,4,3,1
139
+ 4,53,1,1,3,0
140
+ 5,67,3,5,3,1
141
+ 5,80,4,5,3,1
142
+ 4,55,2,1,3,0
143
+ 4,48,1,1,?,0
144
+ 4,47,1,1,2,0
145
+ 4,50,2,1,?,0
146
+ 5,62,4,5,3,1
147
+ 5,63,4,4,3,1
148
+ 4,63,4,?,3,1
149
+ 4,71,4,4,3,1
150
+ 4,41,1,1,3,0
151
+ 5,57,4,4,4,1
152
+ 5,71,4,4,4,1
153
+ 4,66,1,1,3,0
154
+ 4,47,2,4,2,0
155
+ 3,34,4,4,3,0
156
+ 4,59,3,4,3,0
157
+ 5,55,2,?,?,1
158
+ 4,51,?,?,3,0
159
+ 4,62,2,1,?,0
160
+ 4,58,4,?,3,1
161
+ 5,67,4,4,3,1
162
+ 4,41,2,1,3,0
163
+ 4,23,3,1,3,0
164
+ 4,53,?,4,3,0
165
+ 4,42,2,1,3,0
166
+ 5,87,4,5,3,1
167
+ 4,68,1,1,3,1
168
+ 4,64,1,1,3,0
169
+ 5,54,3,5,3,1
170
+ 5,86,4,5,3,1
171
+ 4,21,2,1,3,0
172
+ 4,39,1,1,?,0
173
+ 4,53,4,4,3,0
174
+ 4,44,4,4,3,0
175
+ 4,54,1,1,3,0
176
+ 5,63,4,5,3,1
177
+ 4,62,2,1,?,0
178
+ 4,45,2,1,2,0
179
+ 5,71,4,5,3,0
180
+ 5,49,4,4,3,1
181
+ 4,49,4,4,3,0
182
+ 5,66,4,4,4,0
183
+ 4,19,1,1,3,0
184
+ 4,35,1,1,2,0
185
+ 4,71,3,3,?,1
186
+ 5,74,4,5,3,1
187
+ 5,37,4,4,3,1
188
+ 4,67,1,?,3,0
189
+ 5,81,3,4,3,1
190
+ 5,59,4,4,3,1
191
+ 4,34,1,1,3,0
192
+ 5,79,4,3,3,1
193
+ 5,60,3,1,3,0
194
+ 4,41,1,1,3,1
195
+ 4,50,1,1,3,0
196
+ 5,85,4,4,3,1
197
+ 4,46,1,1,3,0
198
+ 5,66,4,4,3,1
199
+ 4,73,3,1,2,0
200
+ 4,55,1,1,3,0
201
+ 4,49,2,1,3,0
202
+ 3,49,4,4,3,0
203
+ 4,51,4,5,3,1
204
+ 2,48,4,4,3,0
205
+ 4,58,4,5,3,0
206
+ 5,72,4,5,3,1
207
+ 4,46,2,3,3,0
208
+ 4,43,4,3,3,1
209
+ ?,52,4,4,3,0
210
+ 4,66,2,1,?,0
211
+ 4,46,1,1,1,0
212
+ 4,69,3,1,3,0
213
+ 2,59,1,1,?,1
214
+ 5,43,2,1,3,1
215
+ 5,76,4,5,3,1
216
+ 4,46,1,1,3,0
217
+ 4,59,2,4,3,0
218
+ 4,57,1,1,3,0
219
+ 5,43,4,5,?,0
220
+ 3,45,2,1,3,0
221
+ 3,43,2,1,3,0
222
+ 4,45,2,1,3,0
223
+ 5,57,4,5,3,1
224
+ 5,79,4,4,3,1
225
+ 5,54,2,1,3,1
226
+ 4,40,3,4,3,0
227
+ 5,63,4,4,3,1
228
+ 2,55,1,?,1,0
229
+ 4,52,2,1,3,0
230
+ 4,38,1,1,3,0
231
+ 3,72,4,3,3,0
232
+ 5,80,4,3,3,1
233
+ 5,76,4,3,3,1
234
+ 4,62,3,1,3,0
235
+ 5,64,4,5,3,1
236
+ 5,42,4,5,3,0
237
+ 3,60,?,3,1,0
238
+ 4,64,4,5,3,0
239
+ 4,63,4,4,3,1
240
+ 4,24,2,1,2,0
241
+ 5,72,4,4,3,1
242
+ 4,63,2,1,3,0
243
+ 4,46,1,1,3,0
244
+ 3,33,1,1,3,0
245
+ 5,76,4,4,3,1
246
+ 4,36,2,3,3,0
247
+ 4,40,2,1,3,0
248
+ 5,58,1,5,3,1
249
+ 4,43,2,1,3,0
250
+ 3,42,1,1,3,0
251
+ 4,32,1,1,3,0
252
+ 5,57,4,4,2,1
253
+ 4,37,1,1,3,0
254
+ 4,70,4,4,3,1
255
+ 5,56,4,2,3,1
256
+ 3,76,?,3,2,0
257
+ 5,73,4,4,3,1
258
+ 5,77,4,5,3,1
259
+ 5,67,4,4,1,1
260
+ 5,71,4,3,3,1
261
+ 5,65,4,4,3,1
262
+ 4,43,1,1,3,0
263
+ 4,40,2,1,?,0
264
+ 4,49,2,1,3,0
265
+ 5,76,4,2,3,1
266
+ 4,55,4,4,3,0
267
+ 5,72,4,5,3,1
268
+ 3,53,4,3,3,0
269
+ 5,75,4,4,3,1
270
+ 5,61,4,5,3,1
271
+ 5,67,4,4,3,1
272
+ 5,55,4,2,3,1
273
+ 5,66,4,4,3,1
274
+ 2,76,1,1,2,0
275
+ 4,57,4,4,3,1
276
+ 5,71,3,1,3,0
277
+ 5,70,4,5,3,1
278
+ 4,35,4,2,?,0
279
+ 5,79,1,?,3,1
280
+ 4,63,2,1,3,0
281
+ 5,40,1,4,3,1
282
+ 4,41,1,1,3,0
283
+ 4,47,2,1,2,0
284
+ 4,68,1,1,3,1
285
+ 4,64,4,3,3,1
286
+ 4,65,4,4,?,1
287
+ 4,73,4,3,3,0
288
+ 4,39,4,3,3,0
289
+ 5,55,4,5,4,1
290
+ 5,53,3,4,4,0
291
+ 5,66,4,4,3,1
292
+ 4,43,3,1,2,0
293
+ 5,44,4,5,3,1
294
+ 4,77,4,4,3,1
295
+ 4,62,2,4,3,0
296
+ 5,80,4,4,3,1
297
+ 4,33,4,4,3,0
298
+ 4,50,4,5,3,1
299
+ 4,71,1,?,3,0
300
+ 5,46,4,4,3,1
301
+ 5,49,4,5,3,1
302
+ 4,53,1,1,3,0
303
+ 3,46,2,1,2,0
304
+ 4,57,1,1,3,0
305
+ 4,54,3,1,3,0
306
+ 4,54,1,?,?,0
307
+ 2,49,2,1,2,0
308
+ 4,47,3,1,3,0
309
+ 4,40,1,1,3,0
310
+ 4,45,1,1,3,0
311
+ 4,50,4,5,3,1
312
+ 5,54,4,4,3,1
313
+ 4,67,4,1,3,1
314
+ 4,77,4,4,3,1
315
+ 4,66,4,3,3,0
316
+ 4,71,2,?,3,1
317
+ 4,36,2,3,3,0
318
+ 4,69,4,4,3,0
319
+ 4,48,1,1,3,0
320
+ 4,64,4,4,3,1
321
+ 4,71,4,2,3,1
322
+ 5,60,4,3,3,1
323
+ 4,24,1,1,3,0
324
+ 5,34,4,5,2,1
325
+ 4,79,1,1,2,0
326
+ 4,45,1,1,3,0
327
+ 4,37,2,1,2,0
328
+ 4,42,1,1,2,0
329
+ 4,72,4,4,3,1
330
+ 5,60,4,5,3,1
331
+ 5,85,3,5,3,1
332
+ 4,51,1,1,3,0
333
+ 5,54,4,5,3,1
334
+ 5,55,4,3,3,1
335
+ 4,64,4,4,3,0
336
+ 5,67,4,5,3,1
337
+ 5,75,4,3,3,1
338
+ 5,87,4,4,3,1
339
+ 4,46,4,4,3,1
340
+ 4,59,2,1,?,0
341
+ 55,46,4,3,3,1
342
+ 5,61,1,1,3,1
343
+ 4,44,1,4,3,0
344
+ 4,32,1,1,3,0
345
+ 4,62,1,1,3,0
346
+ 5,59,4,5,3,1
347
+ 4,61,4,1,3,0
348
+ 5,78,4,4,3,1
349
+ 5,42,4,5,3,0
350
+ 4,45,1,2,3,0
351
+ 5,34,2,1,3,1
352
+ 5,39,4,3,?,1
353
+ 4,27,3,1,3,0
354
+ 4,43,1,1,3,0
355
+ 5,83,4,4,3,1
356
+ 4,36,2,1,3,0
357
+ 4,37,2,1,3,0
358
+ 4,56,3,1,3,1
359
+ 5,55,4,4,3,1
360
+ 5,46,3,?,3,0
361
+ 4,88,4,4,3,1
362
+ 5,71,4,4,3,1
363
+ 4,41,2,1,3,0
364
+ 5,49,4,4,3,1
365
+ 3,51,1,1,4,0
366
+ 4,39,1,3,3,0
367
+ 4,46,2,1,3,0
368
+ 5,52,4,4,3,1
369
+ 5,58,4,4,3,1
370
+ 4,67,4,5,3,1
371
+ 5,80,4,4,3,1
372
+ 3,46,1,?,?,0
373
+ 3,43,1,?,?,0
374
+ 4,45,1,1,3,0
375
+ 5,68,4,4,3,1
376
+ 4,54,4,4,?,1
377
+ 4,44,2,3,3,0
378
+ 5,74,4,3,3,1
379
+ 5,55,4,5,3,0
380
+ 4,49,4,4,3,1
381
+ 4,49,1,1,3,0
382
+ 5,50,4,3,3,1
383
+ 5,52,3,5,3,1
384
+ 4,45,1,1,3,0
385
+ 4,66,1,1,3,0
386
+ 4,68,4,4,3,1
387
+ 4,72,2,1,3,0
388
+ 5,64,?,?,3,0
389
+ 2,49,?,3,3,0
390
+ 3,44,?,4,3,0
391
+ 5,74,4,4,3,1
392
+ 5,58,4,4,3,1
393
+ 4,77,2,3,3,0
394
+ 4,49,3,1,3,0
395
+ 4,34,?,?,4,0
396
+ 5,60,4,3,3,1
397
+ 5,69,4,3,3,1
398
+ 4,53,2,1,3,0
399
+ 3,46,3,4,3,0
400
+ 5,74,4,4,3,1
401
+ 4,58,1,1,3,0
402
+ 5,68,4,4,3,1
403
+ 5,46,4,3,3,0
404
+ 5,61,2,4,3,1
405
+ 5,70,4,3,3,1
406
+ 5,37,4,4,3,1
407
+ 3,65,4,5,3,1
408
+ 4,67,4,4,3,0
409
+ 5,69,3,4,3,0
410
+ 5,76,4,4,3,1
411
+ 4,65,4,3,3,0
412
+ 5,72,4,2,3,1
413
+ 4,62,4,2,3,0
414
+ 5,42,4,4,3,1
415
+ 5,66,4,3,3,1
416
+ 5,48,4,4,3,1
417
+ 4,35,1,1,3,0
418
+ 5,60,4,4,3,1
419
+ 5,67,4,2,3,1
420
+ 5,78,4,4,3,1
421
+ 4,66,1,1,3,1
422
+ 4,26,1,1,?,0
423
+ 4,48,1,1,3,0
424
+ 4,31,1,1,3,0
425
+ 5,43,4,3,3,1
426
+ 5,72,2,4,3,0
427
+ 5,66,1,1,3,1
428
+ 4,56,4,4,3,0
429
+ 5,58,4,5,3,1
430
+ 5,33,2,4,3,1
431
+ 4,37,1,1,3,0
432
+ 5,36,4,3,3,1
433
+ 4,39,2,3,3,0
434
+ 4,39,4,4,3,1
435
+ 5,83,4,4,3,1
436
+ 4,68,4,5,3,1
437
+ 5,63,3,4,3,1
438
+ 5,78,4,4,3,1
439
+ 4,38,2,3,3,0
440
+ 5,46,4,3,3,1
441
+ 5,60,4,4,3,1
442
+ 5,56,2,3,3,1
443
+ 4,33,1,1,3,0
444
+ 4,?,4,5,3,1
445
+ 4,69,1,5,3,1
446
+ 5,66,1,4,3,1
447
+ 4,72,1,3,3,0
448
+ 4,29,1,1,3,0
449
+ 5,54,4,5,3,1
450
+ 5,80,4,4,3,1
451
+ 5,68,4,3,3,1
452
+ 4,35,2,1,3,0
453
+ 4,57,3,?,3,0
454
+ 5,?,4,4,3,1
455
+ 4,50,1,1,3,0
456
+ 4,32,4,3,3,0
457
+ 0,69,4,5,3,1
458
+ 4,71,4,5,3,1
459
+ 5,87,4,5,3,1
460
+ 3,40,2,?,3,0
461
+ 4,31,1,1,?,0
462
+ 4,64,1,1,3,0
463
+ 5,55,4,5,3,1
464
+ 4,18,1,1,3,0
465
+ 3,50,2,1,?,0
466
+ 4,53,1,1,3,0
467
+ 5,84,4,5,3,1
468
+ 5,80,4,3,3,1
469
+ 4,32,1,1,3,0
470
+ 5,77,3,4,3,1
471
+ 4,38,1,1,3,0
472
+ 5,54,4,5,3,1
473
+ 4,63,1,1,3,0
474
+ 4,61,1,1,3,0
475
+ 4,52,1,1,3,0
476
+ 4,36,1,1,3,0
477
+ 4,41,?,?,3,0
478
+ 4,59,1,1,3,0
479
+ 5,51,4,4,2,1
480
+ 4,36,1,1,3,0
481
+ 5,40,4,3,3,1
482
+ 4,49,1,1,3,0
483
+ 4,37,2,3,3,0
484
+ 4,46,1,1,3,0
485
+ 4,63,1,1,3,0
486
+ 4,28,2,1,3,0
487
+ 4,47,2,1,3,0
488
+ 4,42,2,1,3,1
489
+ 5,44,4,5,3,1
490
+ 4,49,4,4,3,0
491
+ 5,47,4,5,3,1
492
+ 5,52,4,5,3,1
493
+ 4,53,1,1,3,1
494
+ 5,83,3,3,3,1
495
+ 4,50,4,4,?,1
496
+ 5,63,4,4,3,1
497
+ 4,82,?,5,3,1
498
+ 4,54,1,1,3,0
499
+ 4,50,4,4,3,0
500
+ 5,80,4,5,3,1
501
+ 5,45,2,4,3,0
502
+ 5,59,4,4,?,1
503
+ 4,28,2,1,3,0
504
+ 4,31,1,1,3,0
505
+ 4,41,2,1,3,0
506
+ 4,21,3,1,3,0
507
+ 5,44,3,4,3,1
508
+ 5,49,4,4,3,1
509
+ 5,71,4,5,3,1
510
+ 5,75,4,5,3,1
511
+ 4,38,2,1,3,0
512
+ 4,60,1,3,3,0
513
+ 5,87,4,5,3,1
514
+ 4,70,4,4,3,1
515
+ 5,55,4,5,3,1
516
+ 3,21,1,1,3,0
517
+ 4,50,1,1,3,0
518
+ 5,76,4,5,3,1
519
+ 4,23,1,1,3,0
520
+ 3,68,?,?,3,0
521
+ 4,62,4,?,3,1
522
+ 5,65,1,?,3,1
523
+ 5,73,4,5,3,1
524
+ 4,38,2,3,3,0
525
+ 2,57,1,1,3,0
526
+ 5,65,4,5,3,1
527
+ 5,67,2,4,3,1
528
+ 5,61,2,4,3,1
529
+ 5,56,4,4,3,0
530
+ 5,71,2,4,3,1
531
+ 4,49,2,2,3,0
532
+ 4,55,?,?,3,0
533
+ 4,44,2,1,3,0
534
+ 0,58,4,4,3,0
535
+ 4,27,2,1,3,0
536
+ 5,73,4,5,3,1
537
+ 4,34,2,1,3,0
538
+ 5,63,?,4,3,1
539
+ 4,50,2,1,3,1
540
+ 4,62,2,1,3,0
541
+ 3,21,3,1,3,0
542
+ 4,49,2,?,3,0
543
+ 4,36,3,1,3,0
544
+ 4,45,2,1,3,1
545
+ 5,67,4,5,3,1
546
+ 4,21,1,1,3,0
547
+ 4,57,2,1,3,0
548
+ 5,66,4,5,3,1
549
+ 4,71,4,4,3,1
550
+ 5,69,3,4,3,1
551
+ 6,80,4,5,3,1
552
+ 3,27,2,1,3,0
553
+ 4,38,2,1,3,0
554
+ 4,23,2,1,3,0
555
+ 5,70,?,5,3,1
556
+ 4,46,4,3,3,0
557
+ 4,61,2,3,3,0
558
+ 5,65,4,5,3,1
559
+ 4,60,4,3,3,0
560
+ 5,83,4,5,3,1
561
+ 5,40,4,4,3,1
562
+ 2,59,?,4,3,0
563
+ 4,53,3,4,3,0
564
+ 4,76,4,4,3,0
565
+ 5,79,1,4,3,1
566
+ 5,38,2,4,3,1
567
+ 4,61,3,4,3,0
568
+ 4,56,2,1,3,0
569
+ 4,44,2,1,3,0
570
+ 4,64,3,4,?,1
571
+ 4,66,3,3,3,0
572
+ 4,50,3,3,3,0
573
+ 4,46,1,1,3,0
574
+ 4,39,1,1,3,0
575
+ 4,60,3,?,?,0
576
+ 5,55,4,5,3,1
577
+ 4,40,2,1,3,0
578
+ 4,26,1,1,3,0
579
+ 5,84,3,2,3,1
580
+ 4,41,2,2,3,0
581
+ 4,63,1,1,3,0
582
+ 2,65,?,1,2,0
583
+ 4,49,1,1,3,0
584
+ 4,56,2,2,3,1
585
+ 5,65,4,4,3,0
586
+ 4,54,1,1,3,0
587
+ 4,36,1,1,3,0
588
+ 5,49,4,4,3,0
589
+ 4,59,4,4,3,1
590
+ 5,75,4,4,3,1
591
+ 5,59,4,2,3,0
592
+ 5,59,4,4,3,1
593
+ 4,28,4,4,3,1
594
+ 5,53,4,5,3,0
595
+ 5,57,4,4,3,0
596
+ 5,77,4,3,4,0
597
+ 5,85,4,3,3,1
598
+ 4,59,4,4,3,0
599
+ 5,59,1,5,3,1
600
+ 4,65,3,3,3,1
601
+ 4,54,2,1,3,0
602
+ 5,46,4,5,3,1
603
+ 4,63,4,4,3,1
604
+ 4,53,1,1,3,1
605
+ 4,56,1,1,3,0
606
+ 5,66,4,4,3,1
607
+ 5,66,4,5,3,1
608
+ 4,55,1,1,3,0
609
+ 4,44,1,1,3,0
610
+ 5,86,3,4,3,1
611
+ 5,47,4,5,3,1
612
+ 5,59,4,5,3,1
613
+ 5,66,4,5,3,0
614
+ 5,61,4,3,3,1
615
+ 3,46,?,5,?,1
616
+ 4,69,1,1,3,0
617
+ 5,93,1,5,3,1
618
+ 4,39,1,3,3,0
619
+ 5,44,4,5,3,1
620
+ 4,45,2,2,3,0
621
+ 4,51,3,4,3,0
622
+ 4,56,2,4,3,0
623
+ 4,66,4,4,3,0
624
+ 5,61,4,5,3,1
625
+ 4,64,3,3,3,1
626
+ 5,57,2,4,3,0
627
+ 5,79,4,4,3,1
628
+ 4,57,2,1,?,0
629
+ 4,44,4,1,1,0
630
+ 4,31,2,1,3,0
631
+ 4,63,4,4,3,0
632
+ 4,64,1,1,3,0
633
+ 5,47,4,5,3,0
634
+ 5,68,4,5,3,1
635
+ 4,30,1,1,3,0
636
+ 5,43,4,5,3,1
637
+ 4,56,1,1,3,0
638
+ 4,46,2,1,3,0
639
+ 4,67,2,1,3,0
640
+ 5,52,4,5,3,1
641
+ 4,67,4,4,3,1
642
+ 4,47,2,1,3,0
643
+ 5,58,4,5,3,1
644
+ 4,28,2,1,3,0
645
+ 4,43,1,1,3,0
646
+ 4,57,2,4,3,0
647
+ 5,68,4,5,3,1
648
+ 4,64,2,4,3,0
649
+ 4,64,2,4,3,0
650
+ 5,62,4,4,3,1
651
+ 4,38,4,1,3,0
652
+ 5,68,4,4,3,1
653
+ 4,41,2,1,3,0
654
+ 4,35,2,1,3,1
655
+ 4,68,2,1,3,0
656
+ 5,55,4,4,3,1
657
+ 5,67,4,4,3,1
658
+ 4,51,4,3,3,0
659
+ 2,40,1,1,3,0
660
+ 5,73,4,4,3,1
661
+ 4,58,?,4,3,1
662
+ 4,51,?,4,3,0
663
+ 3,50,?,?,3,1
664
+ 5,59,4,3,3,1
665
+ 6,60,3,5,3,1
666
+ 4,27,2,1,?,0
667
+ 5,54,4,3,3,0
668
+ 4,56,1,1,3,0
669
+ 5,53,4,5,3,1
670
+ 4,54,2,4,3,0
671
+ 5,79,1,4,3,1
672
+ 5,67,4,3,3,1
673
+ 5,64,3,3,3,1
674
+ 4,70,1,2,3,1
675
+ 5,55,4,3,3,1
676
+ 5,65,3,3,3,1
677
+ 5,45,4,2,3,1
678
+ 4,57,4,4,?,1
679
+ 5,49,1,1,3,1
680
+ 4,24,2,1,3,0
681
+ 4,52,1,1,3,0
682
+ 4,50,2,1,3,0
683
+ 4,35,1,1,3,0
684
+ 5,?,3,3,3,1
685
+ 5,64,4,3,3,1
686
+ 5,40,4,1,1,1
687
+ 5,66,4,4,3,1
688
+ 4,64,4,4,3,1
689
+ 5,52,4,3,3,1
690
+ 5,43,1,4,3,1
691
+ 4,56,4,4,3,0
692
+ 4,72,3,?,3,0
693
+ 6,51,4,4,3,1
694
+ 4,79,4,4,3,1
695
+ 4,22,2,1,3,0
696
+ 4,73,2,1,3,0
697
+ 4,53,3,4,3,0
698
+ 4,59,2,1,3,1
699
+ 4,46,4,4,2,0
700
+ 5,66,4,4,3,1
701
+ 4,50,4,3,3,1
702
+ 4,58,1,1,3,1
703
+ 4,55,1,1,3,0
704
+ 4,62,2,4,3,1
705
+ 4,60,1,1,3,0
706
+ 5,57,4,3,3,1
707
+ 4,57,1,1,3,0
708
+ 6,41,2,1,3,0
709
+ 4,71,2,1,3,1
710
+ 4,32,2,1,3,0
711
+ 4,57,2,1,3,0
712
+ 4,19,1,1,3,0
713
+ 4,62,2,4,3,1
714
+ 5,67,4,5,3,1
715
+ 4,50,4,5,3,0
716
+ 4,65,2,3,2,0
717
+ 4,40,2,4,2,0
718
+ 6,71,4,4,3,1
719
+ 6,68,4,3,3,1
720
+ 4,68,1,1,3,0
721
+ 4,29,1,1,3,0
722
+ 4,53,2,1,3,0
723
+ 5,66,4,4,3,1
724
+ 4,60,3,?,4,0
725
+ 5,76,4,4,3,1
726
+ 4,58,2,1,2,0
727
+ 5,96,3,4,3,1
728
+ 5,70,4,4,3,1
729
+ 4,34,2,1,3,0
730
+ 4,59,2,1,3,0
731
+ 4,45,3,1,3,1
732
+ 5,65,4,4,3,1
733
+ 4,59,1,1,3,0
734
+ 4,21,2,1,3,0
735
+ 3,43,2,1,3,0
736
+ 4,53,1,1,3,0
737
+ 4,65,2,1,3,0
738
+ 4,64,2,4,3,1
739
+ 4,53,4,4,3,0
740
+ 4,51,1,1,3,0
741
+ 4,59,2,4,3,0
742
+ 4,56,2,1,3,0
743
+ 4,60,2,1,3,0
744
+ 4,22,1,1,3,0
745
+ 4,25,2,1,3,0
746
+ 6,76,3,?,3,0
747
+ 5,69,4,4,3,1
748
+ 4,58,2,1,3,0
749
+ 5,62,4,3,3,1
750
+ 4,56,4,4,3,0
751
+ 4,64,1,1,3,0
752
+ 4,32,2,1,3,0
753
+ 5,48,?,4,?,1
754
+ 5,59,4,4,2,1
755
+ 4,52,1,1,3,0
756
+ 4,63,4,4,3,0
757
+ 5,67,4,4,3,1
758
+ 5,61,4,4,3,1
759
+ 5,59,4,5,3,1
760
+ 5,52,4,3,3,1
761
+ 4,35,4,4,3,0
762
+ 5,77,3,3,3,1
763
+ 5,71,4,3,3,1
764
+ 5,63,4,3,3,1
765
+ 4,38,2,1,2,0
766
+ 5,72,4,3,3,1
767
+ 4,76,4,3,3,1
768
+ 4,53,3,3,3,0
769
+ 4,67,4,5,3,0
770
+ 5,69,2,4,3,1
771
+ 4,54,1,1,3,0
772
+ 2,35,2,1,2,0
773
+ 5,68,4,3,3,1
774
+ 4,68,4,4,3,0
775
+ 4,67,2,4,3,1
776
+ 3,39,1,1,3,0
777
+ 4,44,2,1,3,0
778
+ 4,33,1,1,3,0
779
+ 4,60,?,4,3,0
780
+ 4,58,1,1,3,0
781
+ 4,31,1,1,3,0
782
+ 3,23,1,1,3,0
783
+ 5,56,4,5,3,1
784
+ 4,69,2,1,3,1
785
+ 6,63,1,1,3,0
786
+ 4,65,1,1,3,1
787
+ 4,44,2,1,2,0
788
+ 4,62,3,3,3,1
789
+ 4,67,4,4,3,1
790
+ 4,56,2,1,3,0
791
+ 4,52,3,4,3,0
792
+ 4,43,1,1,3,1
793
+ 4,41,4,3,2,1
794
+ 4,42,3,4,2,0
795
+ 3,46,1,1,3,0
796
+ 5,55,4,4,3,1
797
+ 5,58,4,4,2,1
798
+ 5,87,4,4,3,1
799
+ 4,66,2,1,3,0
800
+ 0,72,4,3,3,1
801
+ 5,60,4,3,3,1
802
+ 5,83,4,4,2,1
803
+ 4,31,2,1,3,0
804
+ 4,53,2,1,3,0
805
+ 4,64,2,3,3,0
806
+ 5,31,4,4,2,1
807
+ 5,62,4,4,2,1
808
+ 4,56,2,1,3,0
809
+ 5,58,4,4,3,1
810
+ 4,67,1,4,3,0
811
+ 5,75,4,5,3,1
812
+ 5,65,3,4,3,1
813
+ 5,74,3,2,3,1
814
+ 4,59,2,1,3,0
815
+ 4,57,4,4,4,1
816
+ 4,76,3,2,3,0
817
+ 4,63,1,4,3,0
818
+ 4,44,1,1,3,0
819
+ 4,42,3,1,2,0
820
+ 4,35,3,?,2,0
821
+ 5,65,4,3,3,1
822
+ 4,70,2,1,3,0
823
+ 4,48,1,1,3,0
824
+ 4,74,1,1,1,1
825
+ 6,40,?,3,4,1
826
+ 4,63,1,1,3,0
827
+ 5,60,4,4,3,1
828
+ 5,86,4,3,3,1
829
+ 4,27,1,1,3,0
830
+ 4,71,4,5,2,1
831
+ 5,85,4,4,3,1
832
+ 4,51,3,3,3,0
833
+ 6,72,4,3,3,1
834
+ 5,52,4,4,3,1
835
+ 4,66,2,1,3,0
836
+ 5,71,4,5,3,1
837
+ 4,42,2,1,3,0
838
+ 4,64,4,4,2,1
839
+ 4,41,2,2,3,0
840
+ 4,50,2,1,3,0
841
+ 4,30,1,1,3,0
842
+ 4,67,1,1,3,0
843
+ 5,62,4,4,3,1
844
+ 4,46,2,1,2,0
845
+ 4,35,1,1,3,0
846
+ 4,53,1,1,2,0
847
+ 4,59,2,1,3,0
848
+ 4,19,3,1,3,0
849
+ 5,86,2,1,3,1
850
+ 4,72,2,1,3,0
851
+ 4,37,2,1,2,0
852
+ 4,46,3,1,3,1
853
+ 4,45,1,1,3,0
854
+ 4,48,4,5,3,0
855
+ 4,58,4,4,3,1
856
+ 4,42,1,1,3,0
857
+ 4,56,2,4,3,1
858
+ 4,47,2,1,3,0
859
+ 4,49,4,4,3,1
860
+ 5,76,2,5,3,1
861
+ 5,62,4,5,3,1
862
+ 5,64,4,4,3,1
863
+ 5,53,4,3,3,1
864
+ 4,70,4,2,2,1
865
+ 5,55,4,4,3,1
866
+ 4,34,4,4,3,0
867
+ 5,76,4,4,3,1
868
+ 4,39,1,1,3,0
869
+ 2,23,1,1,3,0
870
+ 4,19,1,1,3,0
871
+ 5,65,4,5,3,1
872
+ 4,57,2,1,3,0
873
+ 5,41,4,4,3,1
874
+ 4,36,4,5,3,1
875
+ 4,62,3,3,3,0
876
+ 4,69,2,1,3,0
877
+ 4,41,3,1,3,0
878
+ 3,51,2,4,3,0
879
+ 5,50,3,2,3,1
880
+ 4,47,4,4,3,0
881
+ 4,54,4,5,3,1
882
+ 5,52,4,4,3,1
883
+ 4,30,1,1,3,0
884
+ 3,48,4,4,3,1
885
+ 5,?,4,4,3,1
886
+ 4,65,2,4,3,1
887
+ 4,50,1,1,3,0
888
+ 5,65,4,5,3,1
889
+ 5,66,4,3,3,1
890
+ 6,41,3,3,2,1
891
+ 5,72,3,2,3,1
892
+ 4,42,1,1,1,1
893
+ 4,80,4,4,3,1
894
+ 0,45,2,4,3,0
895
+ 4,41,1,1,3,0
896
+ 4,72,3,3,3,1
897
+ 4,60,4,5,3,0
898
+ 5,67,4,3,3,1
899
+ 4,55,2,1,3,0
900
+ 4,61,3,4,3,1
901
+ 4,55,3,4,3,1
902
+ 4,52,4,4,3,1
903
+ 4,42,1,1,3,0
904
+ 5,63,4,4,3,1
905
+ 4,62,4,5,3,1
906
+ 4,46,1,1,3,0
907
+ 4,65,2,1,3,0
908
+ 4,57,3,3,3,1
909
+ 4,66,4,5,3,1
910
+ 4,45,1,1,3,0
911
+ 4,77,4,5,3,1
912
+ 4,35,1,1,3,0
913
+ 4,50,4,5,3,1
914
+ 4,57,4,4,3,0
915
+ 4,74,3,1,3,1
916
+ 4,59,4,5,3,0
917
+ 4,51,1,1,3,0
918
+ 4,42,3,4,3,1
919
+ 4,35,2,4,3,0
920
+ 4,42,1,1,3,0
921
+ 4,43,2,1,3,0
922
+ 4,62,4,4,3,1
923
+ 4,27,2,1,3,0
924
+ 5,?,4,3,3,1
925
+ 4,57,4,4,3,1
926
+ 4,59,2,1,3,0
927
+ 5,40,3,2,3,1
928
+ 4,20,1,1,3,0
929
+ 5,74,4,3,3,1
930
+ 4,22,1,1,3,0
931
+ 4,57,4,3,3,0
932
+ 4,57,4,3,3,1
933
+ 4,55,2,1,2,0
934
+ 4,62,2,1,3,0
935
+ 4,54,1,1,3,0
936
+ 4,71,1,1,3,1
937
+ 4,65,3,3,3,0
938
+ 4,68,4,4,3,0
939
+ 4,64,1,1,3,0
940
+ 4,54,2,4,3,0
941
+ 4,48,4,4,3,1
942
+ 4,58,4,3,3,0
943
+ 5,58,3,4,3,1
944
+ 4,70,1,1,1,0
945
+ 5,70,1,4,3,1
946
+ 4,59,2,1,3,0
947
+ 4,57,2,4,3,0
948
+ 4,53,4,5,3,0
949
+ 4,54,4,4,3,1
950
+ 4,53,2,1,3,0
951
+ 0,71,4,4,3,1
952
+ 5,67,4,5,3,1
953
+ 4,68,4,4,3,1
954
+ 4,56,2,4,3,0
955
+ 4,35,2,1,3,0
956
+ 4,52,4,4,3,1
957
+ 4,47,2,1,3,0
958
+ 4,56,4,5,3,1
959
+ 4,64,4,5,3,0
960
+ 5,66,4,5,3,1
961
+ 4,62,3,3,3,0
mammography.py ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Mammography"""
2
+
3
+ from typing import List
4
+ from functools import partial
5
+
6
+ import datasets
7
+
8
+ import pandas
9
+
10
+
11
+ VERSION = datasets.Version("1.0.0")
12
+ _ORIGINAL_FEATURE_NAMES = [
13
+ "rads",
14
+ "age",
15
+ "shape",
16
+ "margin",
17
+ "density",
18
+ "is_severe"
19
+ ]
20
+ _BASE_FEATURE_NAMES = [
21
+ "age",
22
+ "shape",
23
+ "margin",
24
+ "density",
25
+ "is_severe"
26
+ ]
27
+ _ENCODING_DICS = {
28
+ "shape": {
29
+ 1: "round",
30
+ 2: "oval",
31
+ 3: "lobular",
32
+ 4: "irregular",
33
+ },
34
+ "margin": {
35
+ 1: "circumbscribed",
36
+ 2: "microlobulated",
37
+ 3: "obscured",
38
+ 4: "ill-defined",
39
+ 5: "spiculated",
40
+ },
41
+ "density": {
42
+ 1: "high",
43
+ 2: "iso",
44
+ 3: "low",
45
+ 4: "fat-containing",
46
+ 5: "spiculated",
47
+ },
48
+ }
49
+
50
+ DESCRIPTION = "Mammography dataset from the UCI ML repository."
51
+ _HOMEPAGE = "https://archive.ics.uci.edu/ml/datasets/Mammography"
52
+ _URLS = ("https://huggingface.co/datasets/mstz/mammography/raw/mammography_masses.data")
53
+ _CITATION = """
54
+ @misc{misc_mammographic_mass_161,
55
+ author = {Elter,Matthias},
56
+ title = {{Mammographic Mass}},
57
+ year = {2007},
58
+ howpublished = {UCI Machine Learning Repository},
59
+ note = {{DOI}: \\url{10.24432/C53K6Z}}
60
+ }"""
61
+
62
+ # Dataset info
63
+ urls_per_split = {
64
+ "train": "https://huggingface.co/datasets/mstz/mammography/raw/main/mammographic_masses.data"
65
+ }
66
+ features_types_per_config = {
67
+ "mammography": {
68
+
69
+ "over_threshold": datasets.ClassLabel(num_classes=2, names=("no", "yes"))
70
+ }
71
+ }
72
+ features_per_config = {k: datasets.Features(features_types_per_config[k]) for k in features_types_per_config}
73
+
74
+
75
+ class MammographyConfig(datasets.BuilderConfig):
76
+ def __init__(self, **kwargs):
77
+ super(MammographyConfig, self).__init__(version=VERSION, **kwargs)
78
+ self.features = features_per_config[kwargs["name"]]
79
+
80
+
81
+ class Mammography(datasets.GeneratorBasedBuilder):
82
+ # dataset versions
83
+ DEFAULT_CONFIG = "mammography"
84
+ BUILDER_CONFIGS = [
85
+ MammographyConfig(name="mammography",
86
+ description="Mammography for binary classification.")
87
+ ]
88
+
89
+
90
+ def _info(self):
91
+ info = datasets.DatasetInfo(description=DESCRIPTION, citation=_CITATION, homepage=_HOMEPAGE,
92
+ features=features_per_config[self.config.name])
93
+
94
+ return info
95
+
96
+ def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
97
+ downloads = dl_manager.download_and_extract(urls_per_split)
98
+
99
+ return [
100
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloads["train"]})
101
+ ]
102
+
103
+ def _generate_examples(self, filepath: str):
104
+ data = pandas.read_csv(filepath, header=None)
105
+ data.columns = _ORIGINAL_FEATURE_NAMES
106
+
107
+ data.drop("rads", axis="columns", inplace=True)
108
+ data = data[(data.age != "?") & (data.shape != "?") & (data.margin != "?") & (data.density != "?")]
109
+ data = data.infer_objects()
110
+ for feature in _ENCODING_DICS:
111
+ encoding_function = partial(self.encode, feature)
112
+ data.loc[:, feature] = data[feature].apply(encoding_function)
113
+
114
+ for row_id, row in data.iterrows():
115
+ data_row = dict(row)
116
+
117
+ yield row_id, data_row
118
+
119
+
120
+ def encode(self, feature, value):
121
+ if feature in _ENCODING_DICS:
122
+ return _ENCODING_DICS[feature][value]
123
+ raise ValueError(f"Unknown feature: {feature}")