mstz commited on
Commit
90e82da
1 Parent(s): b151acf

Upload 2 files

Browse files
Files changed (2) hide show
  1. data.csv +0 -0
  2. toxicity.py +1279 -0
data.csv ADDED
The diff for this file is too large to render. See raw diff
 
toxicity.py ADDED
@@ -0,0 +1,1279 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import List
2
+
3
+ import datasets
4
+
5
+ import pandas
6
+ import gzip
7
+
8
+
9
+ VERSION = datasets.Version("1.0.0")
10
+
11
+
12
+ DESCRIPTION = "Toxicity dataset from the UCI ML repository."
13
+ _HOMEPAGE = "https://archive-beta.ics.uci.edu/dataset/31/toxicity"
14
+ _URLS = ("https://archive-beta.ics.uci.edu/dataset/31/toxicity")
15
+ _CITATION = """"""
16
+
17
+ # Dataset info
18
+ urls_per_split = {
19
+ "train": "https://huggingface.co/datasets/mstz/toxicity/raw/main/data.csv"
20
+ }
21
+
22
+ _BASE_FEATURE_NAMES = [
23
+ "MATS3v",
24
+ "nHBint10",
25
+ "MATS3s",
26
+ "MATS3p",
27
+ "nHBDon_Lipinski",
28
+ "minHBint8",
29
+ "MATS3e",
30
+ "MATS3c",
31
+ "minHBint2",
32
+ "MATS3m",
33
+ "minHBint6",
34
+ "minHBint7",
35
+ "minHBint4",
36
+ "MATS3i",
37
+ "VR3_Dt",
38
+ "SpMax8_Bhi",
39
+ "SdsN",
40
+ "SpMax8_Bhm",
41
+ "SpMax8_Bhe",
42
+ "ECCEN",
43
+ "MDEC-14",
44
+ "SpMax8_Bhs",
45
+ "SpMax8_Bhp",
46
+ "SpMax8_Bhv",
47
+ "MDEC-11",
48
+ "MDEC-12",
49
+ "MDEC-13",
50
+ "VR2_Dt",
51
+ "BIC5",
52
+ "ATS7s",
53
+ "ATS7p",
54
+ "ATS7v",
55
+ "ATS7i",
56
+ "ATS7m",
57
+ "ATS7e",
58
+ "mintN",
59
+ "nHsNH2",
60
+ "khs.sssCH",
61
+ "minHBint3",
62
+ "maxdssC",
63
+ "nT6Ring",
64
+ "minHBint5",
65
+ "nF8Ring",
66
+ "minssCH2",
67
+ "SpMax_DzZ",
68
+ "ETA_EtaP",
69
+ "nHsOH",
70
+ "SpMin1_Bhe",
71
+ "maxHother",
72
+ "nHBAcc_Lipinski",
73
+ "StN",
74
+ "khs.aaS",
75
+ "khs.aaO",
76
+ "khs.aaN",
77
+ "Sare",
78
+ "SHAvin",
79
+ "SpMax3_Bhv",
80
+ "SpMax3_Bhp",
81
+ "SpMax3_Bhs",
82
+ "SpMax3_Bhe",
83
+ "SpMin6_Bhi",
84
+ "SpMax3_Bhm",
85
+ "SpMax3_Bhi",
86
+ "ETA_EtaP_F_L",
87
+ "mindCH2",
88
+ "AATSC2e",
89
+ "AATSC2c",
90
+ "AATSC2m",
91
+ "AATSC2i",
92
+ "nsBr",
93
+ "AATS5p",
94
+ "AATSC2v",
95
+ "AATSC2p",
96
+ "AATSC2s",
97
+ "VABC",
98
+ "maxdNH",
99
+ "khs.ddsN",
100
+ "RotBtFrac",
101
+ "ATS4e",
102
+ "ATS4m",
103
+ "nFRing",
104
+ "ATS4i",
105
+ "EE_DzZ",
106
+ "ATS4s",
107
+ "ATS4p",
108
+ "ETA_Alpha",
109
+ "khs.sssN",
110
+ "EE_Dzi",
111
+ "MAXDN",
112
+ "EE_Dzm",
113
+ "EE_Dze",
114
+ "EE_Dzs",
115
+ "EE_Dzp",
116
+ "EE_Dzv",
117
+ "ATS8e",
118
+ "maxsOH",
119
+ "minssssNp",
120
+ "maxsOm",
121
+ "MDEC-23",
122
+ "MDEC-22",
123
+ "MDEC-24",
124
+ "nFG12HeteroRing",
125
+ "ATS8s",
126
+ "ATS8v",
127
+ "SP-6",
128
+ "SP-7",
129
+ "SHsNH2",
130
+ "SP-5",
131
+ "SP-2",
132
+ "SP-3",
133
+ "SP-0",
134
+ "SP-1",
135
+ "minHsOH",
136
+ "ATSC8v",
137
+ "MATS2v",
138
+ "ATSC8s",
139
+ "MATS2p",
140
+ "MATS2s",
141
+ "ATSC8p",
142
+ "MATS2e",
143
+ "ATSC8e",
144
+ "ATSC8c",
145
+ "MATS2c",
146
+ "MATS2m",
147
+ "topoDiameter",
148
+ "ATSC8m",
149
+ "MATS2i",
150
+ "ATSC8i",
151
+ "ntN",
152
+ "khs.ssCH2",
153
+ "SpAD_Dt",
154
+ "ETA_Eta_R_L",
155
+ "SHdsCH",
156
+ "SaasN",
157
+ "SC-4",
158
+ "SaasC",
159
+ "minaaCH",
160
+ "AATSC3c",
161
+ "AATSC3e",
162
+ "AATSC3i",
163
+ "AATSC3m",
164
+ "AATSC3s",
165
+ "AATSC3p",
166
+ "AATSC3v",
167
+ "SpMax2_Bhp",
168
+ "nF8HeteroRing",
169
+ "AATS8e",
170
+ "AATS8i",
171
+ "AATS8m",
172
+ "AATS8s",
173
+ "AATS8p",
174
+ "AATS8v",
175
+ "VE3_Dt",
176
+ "XLogP",
177
+ "SpMax2_Bhi",
178
+ "maxssCH2",
179
+ "minaaS",
180
+ "SpMax4_Bhv",
181
+ "SpMax4_Bhs",
182
+ "SpMax4_Bhp",
183
+ "SpMax4_Bhm",
184
+ "minHaaNH",
185
+ "SpMax4_Bhi",
186
+ "minaaN",
187
+ "SpMax4_Bhe",
188
+ "StsC",
189
+ "SssCH2",
190
+ "maxHdNH",
191
+ "MATS1p",
192
+ "R_TpiPCTPC",
193
+ "MATS1s",
194
+ "MATS1v",
195
+ "JGI10",
196
+ "MATS1c",
197
+ "MATS1e",
198
+ "VR2_DzZ",
199
+ "MATS1i",
200
+ "MATS1m",
201
+ "MDEC-34",
202
+ "MDEC-33",
203
+ "VR2_Dze",
204
+ "VR2_Dzm",
205
+ "VR2_Dzs",
206
+ "VR2_Dzp",
207
+ "khs.ssssC",
208
+ "nTG12Ring",
209
+ "khs.ssssN",
210
+ "ATS5e",
211
+ "gmin",
212
+ "VR2_D",
213
+ "ATS5m",
214
+ "ATS5p",
215
+ "ATS5s",
216
+ "ATS5v",
217
+ "AATSC5p",
218
+ "TpiPC",
219
+ "maxsCH3",
220
+ "SdS",
221
+ "khs.ssO",
222
+ "ETA_Eta_F_L",
223
+ "khs.ssS",
224
+ "SdO",
225
+ "VE2_Dt",
226
+ "maxHtCH",
227
+ "SpMax_Dze",
228
+ "SpMax_Dzm",
229
+ "SpMax_Dzi",
230
+ "ETA_dEpsilon_B",
231
+ "SpMax_Dzv",
232
+ "ETA_dEpsilon_A",
233
+ "SpMax_Dzs",
234
+ "ETA_dEpsilon_D",
235
+ "SpMax_Dzp",
236
+ "SsNH2",
237
+ "StCH",
238
+ "SsCH3",
239
+ "CIC5",
240
+ "CIC4",
241
+ "CIC1",
242
+ "CIC0",
243
+ "CIC3",
244
+ "CIC2",
245
+ "nF10HeteroRing",
246
+ "maxssO",
247
+ "WPOL",
248
+ "n5HeteroRing",
249
+ "maxHAvin",
250
+ "fragC",
251
+ "ETA_Eta_B_RC",
252
+ "AATS7m",
253
+ "SpDiam_Dt",
254
+ "SdssC",
255
+ "ETA_Epsilon_3",
256
+ "AATS7i",
257
+ "AATS7e",
258
+ "nT9Ring",
259
+ "minsCl",
260
+ "AATS7v",
261
+ "AATS7s",
262
+ "AATS7p",
263
+ "nHdCH2",
264
+ "ETA_Epsilon_5",
265
+ "ETA_Epsilon_4",
266
+ "SsssCH",
267
+ "maxHsOH",
268
+ "GATS1v",
269
+ "maxaaaC",
270
+ "GATS1s",
271
+ "minsNH2",
272
+ "BIC4",
273
+ "SpMin7_Bhs",
274
+ "SpMin7_Bhp",
275
+ "SpMin7_Bhv",
276
+ "nHtCH",
277
+ "GATS1e",
278
+ "mintsC",
279
+ "GATS1c",
280
+ "SpMin7_Bhm",
281
+ "GATS1m",
282
+ "SpMin7_Bhe",
283
+ "GATS1i",
284
+ "maxtsC",
285
+ "minHAvin",
286
+ "MDEC-44",
287
+ "AATS2v",
288
+ "SPC-6",
289
+ "SPC-4",
290
+ "SPC-5",
291
+ "SpAD_D",
292
+ "MATS6c",
293
+ "ETA_BetaP_s",
294
+ "minaasC",
295
+ "minaasN",
296
+ "minssNH",
297
+ "nT7HeteroRing",
298
+ "RotBFrac",
299
+ "nF10Ring",
300
+ "ETA_BetaP_ns",
301
+ "nH",
302
+ "nL",
303
+ "nN",
304
+ "nO",
305
+ "nA",
306
+ "nC",
307
+ "nF",
308
+ "nX",
309
+ "nQ",
310
+ "nS",
311
+ "nV",
312
+ "ATS1m",
313
+ "SdNH",
314
+ "mindsN",
315
+ "SHCsats",
316
+ "SHCsatu",
317
+ "CrippenMR",
318
+ "GATS1p",
319
+ "SRW10",
320
+ "ETA_dPsi_A",
321
+ "AATS6m",
322
+ "AATS6i",
323
+ "AATS6e",
324
+ "minsBr",
325
+ "nF9HeteroRing",
326
+ "SpMin7_Bhi",
327
+ "AATS6v",
328
+ "AATS6p",
329
+ "AATS6s",
330
+ "naAromAtom",
331
+ "nBase",
332
+ "minHBint10",
333
+ "SpDiam_DzZ",
334
+ "SaaNH",
335
+ "nssssC",
336
+ "khs.dNH",
337
+ "maxaaN",
338
+ "maxaaO",
339
+ "SpDiam_Dzv",
340
+ "SpDiam_Dzs",
341
+ "SpDiam_Dzp",
342
+ "SpDiam_Dze",
343
+ "SpDiam_Dzm",
344
+ "GATS6i",
345
+ "SpDiam_Dzi",
346
+ "Mi",
347
+ "Mv",
348
+ "Mp",
349
+ "GGI10",
350
+ "nBr",
351
+ "bpol",
352
+ "MW",
353
+ "GATS6v",
354
+ "MATS7s",
355
+ "MATS7p",
356
+ "C1SP1",
357
+ "MATS7v",
358
+ "MATS7i",
359
+ "MATS7m",
360
+ "MATS7c",
361
+ "GATS6s",
362
+ "MATS7e",
363
+ "maxtN",
364
+ "SpMin8_Bhe",
365
+ "SpMin8_Bhi",
366
+ "SpMin8_Bhm",
367
+ "SpMin8_Bhp",
368
+ "SpMin8_Bhs",
369
+ "SpMin8_Bhv",
370
+ "maxHCsatu",
371
+ "maxHCsats",
372
+ "ATSC3v",
373
+ "ATSC3s",
374
+ "ATSC3p",
375
+ "minHdCH2",
376
+ "ATSC3e",
377
+ "ATSC3c",
378
+ "maxssNH",
379
+ "ATSC3m",
380
+ "ATSC3i",
381
+ "minHCsatu",
382
+ "minHCsats",
383
+ "SpMax7_Bhe",
384
+ "SpMax7_Bhi",
385
+ "SpMax7_Bhm",
386
+ "ETA_BetaP_ns_d",
387
+ "SpMax7_Bhp",
388
+ "SpMax7_Bhs",
389
+ "SpMax7_Bhv",
390
+ "SdsCH",
391
+ "minssO",
392
+ "minssS",
393
+ "SpMin3_Bhe",
394
+ "SpMin3_Bhm",
395
+ "SpMin3_Bhi",
396
+ "SpMin3_Bhv",
397
+ "nT8Ring",
398
+ "SpMin3_Bhs",
399
+ "SpMin3_Bhp",
400
+ "TPC",
401
+ "khs.tCH",
402
+ "VP-5",
403
+ "VP-4",
404
+ "VP-7",
405
+ "VP-6",
406
+ "VP-1",
407
+ "VP-0",
408
+ "VP-3",
409
+ "VP-2",
410
+ "MIC5",
411
+ "MIC4",
412
+ "MIC3",
413
+ "MIC2",
414
+ "MIC1",
415
+ "MIC0",
416
+ "ATSC5p",
417
+ "piPC10",
418
+ "ATSC5s",
419
+ "minsOm",
420
+ "nT10HeteroRing",
421
+ "nHBa",
422
+ "nHBd",
423
+ "SddssS",
424
+ "nCl",
425
+ "minsOH",
426
+ "SHaaCH",
427
+ "nHBDon",
428
+ "nF11HeteroRing",
429
+ "AATS5i",
430
+ "AATS5m",
431
+ "SpMin6_Bhs",
432
+ "SpMin6_Bhp",
433
+ "SpMin6_Bhv",
434
+ "AATS5e",
435
+ "ETA_dBeta",
436
+ "khs.sCH3",
437
+ "ALogP",
438
+ "SpMin6_Bhm",
439
+ "BCUTp-1l",
440
+ "AATS5s",
441
+ "BCUTp-1h",
442
+ "AATS5v",
443
+ "SpMin6_Bhe",
444
+ "ATS8i",
445
+ "ATS8m",
446
+ "BCUTw-1h",
447
+ "BCUTw-1l",
448
+ "nBondsS3",
449
+ "nBondsS2",
450
+ "ATS8p",
451
+ "GATS3p",
452
+ "GATS3s",
453
+ "GATS3v",
454
+ "GATS3c",
455
+ "GATS3e",
456
+ "SC-5",
457
+ "GATS3i",
458
+ "SC-6",
459
+ "GATS3m",
460
+ "SC-3",
461
+ "minsCH3",
462
+ "SssssC",
463
+ "nAtomLC",
464
+ "nT12HeteroRing",
465
+ "minHaaCH",
466
+ "MLFER_BH",
467
+ "MLFER_BO",
468
+ "SaaaC",
469
+ "mindsCH",
470
+ "nddssS",
471
+ "maxaasC",
472
+ "maxsssN",
473
+ "MATS6p",
474
+ "MATS6s",
475
+ "MATS6v",
476
+ "MATS6i",
477
+ "MATS6m",
478
+ "MATS6e",
479
+ "ETA_Beta_ns_d",
480
+ "hmax",
481
+ "ETA_Beta_s",
482
+ "nHaaCH",
483
+ "khs.aaaC",
484
+ "khs.sNH2",
485
+ "ETA_AlphaP",
486
+ "nAromBond",
487
+ "ATSC2v",
488
+ "ATSC2p",
489
+ "ATSC2s",
490
+ "ATS4v",
491
+ "ATSC2e",
492
+ "ATSC2c",
493
+ "ATSC2m",
494
+ "ATSC2i",
495
+ "AATS4v",
496
+ "AATS4s",
497
+ "AATS4p",
498
+ "AATS4e",
499
+ "ETA_BetaP",
500
+ "AATS4m",
501
+ "khs.sOH",
502
+ "AATS4i",
503
+ "SHsOH",
504
+ "SpMax_D",
505
+ "MDEN-13",
506
+ "MDEN-12",
507
+ "MDEN-11",
508
+ "ntsC",
509
+ "ATS3m",
510
+ "PetitjeanNumber",
511
+ "khs.aasN",
512
+ "khs.aasC",
513
+ "MWC10",
514
+ "MPC7",
515
+ "TWC",
516
+ "topoRadius",
517
+ "WPATH",
518
+ "nG",
519
+ "ndsN",
520
+ "MAXDP",
521
+ "naaaC",
522
+ "SM1_DzZ",
523
+ "SpAbs_DzZ",
524
+ "SpAbs_Dze",
525
+ "khs.aaNH",
526
+ "SpAbs_Dzm",
527
+ "SM1_Dzv",
528
+ "SpAbs_Dzi",
529
+ "SM1_Dzp",
530
+ "SM1_Dzs",
531
+ "SM1_Dzm",
532
+ "SpAbs_Dzv",
533
+ "SM1_Dzi",
534
+ "SpAbs_Dzp",
535
+ "SpAbs_Dzs",
536
+ "SM1_Dze",
537
+ "maxaaCH",
538
+ "maxdO",
539
+ "nF11Ring",
540
+ "GATS2v",
541
+ "GATS2s",
542
+ "ETA_Beta",
543
+ "GATS2m",
544
+ "GATS2i",
545
+ "maxdS",
546
+ "GATS2e",
547
+ "GATS2c",
548
+ "nHaaNH",
549
+ "ATSC1p",
550
+ "ATSC1s",
551
+ "ATSC1v",
552
+ "ATSC1c",
553
+ "ATSC1e",
554
+ "ATSC1i",
555
+ "ATSC1m",
556
+ "MWC9",
557
+ "MWC8",
558
+ "MWC5",
559
+ "MWC4",
560
+ "MWC7",
561
+ "MWC6",
562
+ "ndssC",
563
+ "MWC2",
564
+ "MAXDN2",
565
+ "MATS5e",
566
+ "SpMin2_Bhe",
567
+ "MATS5c",
568
+ "MATS5m",
569
+ "SpMin2_Bhm",
570
+ "MATS5i",
571
+ "SpMin2_Bhi",
572
+ "SpMin2_Bhv",
573
+ "MATS5v",
574
+ "MATS5p",
575
+ "SpMin2_Bhs",
576
+ "SpMin2_Bhp",
577
+ "VE1_Dzi",
578
+ "Mare",
579
+ "BCUTc-1l",
580
+ "BCUTc-1h",
581
+ "SssNH",
582
+ "MPC9",
583
+ "VE1_Dzp",
584
+ "naaN",
585
+ "naaO",
586
+ "naaS",
587
+ "SsBr",
588
+ "SHBd",
589
+ "TSRW",
590
+ "SHBa",
591
+ "khs.ssNH",
592
+ "nT9HeteroRing",
593
+ "SpMax6_Bhp",
594
+ "SpMax6_Bhs",
595
+ "SpMAD_Dzv",
596
+ "SpMax6_Bhv",
597
+ "SpMax6_Bhe",
598
+ "SpMAD_Dze",
599
+ "SpMax6_Bhi",
600
+ "SpMAD_Dzi",
601
+ "SpMax6_Bhm",
602
+ "SpMAD_Dzm",
603
+ "SpMAD_DzZ",
604
+ "AATSC8s",
605
+ "AATSC8p",
606
+ "AATSC8v",
607
+ "minHssNH",
608
+ "AATSC8c",
609
+ "AATSC8e",
610
+ "AATSC8i",
611
+ "AATSC8m",
612
+ "AATS3s",
613
+ "AATS3p",
614
+ "AATS3v",
615
+ "SpMin5_Bhv",
616
+ "SpMin5_Bhp",
617
+ "SpMin5_Bhs",
618
+ "SpMin5_Bhm",
619
+ "SpMin5_Bhi",
620
+ "AATS3e",
621
+ "SpMin5_Bhe",
622
+ "AATS3i",
623
+ "SpMAD_Dzs",
624
+ "AATS3m",
625
+ "n7Ring",
626
+ "maxdCH2",
627
+ "MLFER_L",
628
+ "GATS5s",
629
+ "GATS5p",
630
+ "GATS5v",
631
+ "MLFER_A",
632
+ "GATS5i",
633
+ "GATS5m",
634
+ "IC3",
635
+ "IC2",
636
+ "IC1",
637
+ "IC0",
638
+ "khs.tN",
639
+ "IC5",
640
+ "IC4",
641
+ "ETA_Eta_R",
642
+ "ETA_Eta_L",
643
+ "SHdCH2",
644
+ "ETA_Eta_B",
645
+ "ETA_Eta_F",
646
+ "SaaCH",
647
+ "nAcid",
648
+ "maxsssCH",
649
+ "SsCl",
650
+ "nF6Ring",
651
+ "maxsF",
652
+ "MATS4c",
653
+ "MATS4e",
654
+ "MATS4i",
655
+ "SP-4",
656
+ "MATS4m",
657
+ "MATS4s",
658
+ "MATS4p",
659
+ "MATS4v",
660
+ "minHdNH",
661
+ "VC-6",
662
+ "SsssN",
663
+ "minaaaC",
664
+ "minwHBa",
665
+ "nT6HeteroRing",
666
+ "khs.dssC",
667
+ "AATSC0m",
668
+ "EE_Dt",
669
+ "minsF",
670
+ "ATSC0v",
671
+ "ATSC0s",
672
+ "ATSC0p",
673
+ "ATSC0m",
674
+ "ATSC0i",
675
+ "ATSC0e",
676
+ "ATSC0c",
677
+ "VE2_D",
678
+ "SpMAD_D",
679
+ "nHBint2",
680
+ "nHBint3",
681
+ "ETA_Epsilon_1",
682
+ "nHBint6",
683
+ "nHBint7",
684
+ "nHBint4",
685
+ "nHBint5",
686
+ "nHBint8",
687
+ "nHBint9",
688
+ "nBondsS",
689
+ "AATS2p",
690
+ "AATS2s",
691
+ "nBondsT",
692
+ "AATS2e",
693
+ "nBondsD",
694
+ "AATS2i",
695
+ "AATS2m",
696
+ "nBondsM",
697
+ "nBonds2",
698
+ "MDEN-33",
699
+ "Sp",
700
+ "Sv",
701
+ "Si",
702
+ "FMF",
703
+ "nRotB",
704
+ "n7HeteroRing",
705
+ "minssssC",
706
+ "SwHBa",
707
+ "Zagreb",
708
+ "SRW6",
709
+ "SRW7",
710
+ "SRW4",
711
+ "SRW5",
712
+ "SRW2",
713
+ "khs.sCl",
714
+ "SRW8",
715
+ "SRW9",
716
+ "maxHsNH2",
717
+ "SCH-5",
718
+ "SCH-6",
719
+ "SCH-7",
720
+ "khs.sF",
721
+ "nF9Ring",
722
+ "ATS6p",
723
+ "maxaasN",
724
+ "MAXDP2",
725
+ "minHtCH",
726
+ "nsNH2",
727
+ "nFG12Ring",
728
+ "VE1_DzZ",
729
+ "VE1_Dze",
730
+ "GATS4p",
731
+ "GATS4s",
732
+ "VE1_Dzm",
733
+ "GATS4v",
734
+ "GATS4i",
735
+ "VE1_Dzs",
736
+ "GATS4m",
737
+ "ndsCH",
738
+ "VE1_Dzv",
739
+ "GATS4c",
740
+ "GATS4e",
741
+ "ETA_Beta_ns",
742
+ "McGowan_Volume",
743
+ "n5Ring",
744
+ "ETA_dAlpha_B",
745
+ "ATSC7s",
746
+ "ATSC7p",
747
+ "ETA_dAlpha_A",
748
+ "ATSC7v",
749
+ "ATSC7i",
750
+ "ATSC7m",
751
+ "ATSC7c",
752
+ "VC-4",
753
+ "VC-5",
754
+ "VC-3",
755
+ "ATSC7e",
756
+ "maxssssNp",
757
+ "JGI2",
758
+ "JGI3",
759
+ "JGI1",
760
+ "JGI6",
761
+ "JGI7",
762
+ "JGI4",
763
+ "JGI5",
764
+ "JGI8",
765
+ "JGI9",
766
+ "SpAD_DzZ",
767
+ "SpAD_Dze",
768
+ "SpAD_Dzm",
769
+ "SpAD_Dzi",
770
+ "SpAD_Dzv",
771
+ "SpAD_Dzp",
772
+ "SpAD_Dzs",
773
+ "nsssCH",
774
+ "nBonds",
775
+ "LipinskiFailures",
776
+ "SpDiam_D",
777
+ "minHdsCH",
778
+ "SssO",
779
+ "SssS",
780
+ "C2SP3",
781
+ "C2SP2",
782
+ "C2SP1",
783
+ "GATS2p",
784
+ "ETA_Shape_X",
785
+ "ETA_Shape_Y",
786
+ "ETA_Shape_P",
787
+ "naaNH",
788
+ "khs.dCH2",
789
+ "AVP-5",
790
+ "AVP-4",
791
+ "AVP-7",
792
+ "AVP-1",
793
+ "AVP-0",
794
+ "AVP-2",
795
+ "AATS1v",
796
+ "AATS1p",
797
+ "AATS1s",
798
+ "AATS1m",
799
+ "MDEN-22",
800
+ "AATS1i",
801
+ "AATS1e",
802
+ "maxaaNH",
803
+ "maxHaaNH",
804
+ "nT8HeteroRing",
805
+ "GATS7c",
806
+ "GATS7m",
807
+ "GATS7v",
808
+ "GATS7p",
809
+ "GATS7s",
810
+ "SsOm",
811
+ "SsOH",
812
+ "AATSC4v",
813
+ "maxHBd",
814
+ "AATSC4s",
815
+ "khs.sBr",
816
+ "maxHBa",
817
+ "khs.dsN",
818
+ "SHssNH",
819
+ "AATSC4e",
820
+ "AATSC4c",
821
+ "AATSC4m",
822
+ "AATSC4i",
823
+ "SHBint10",
824
+ "ATS2v",
825
+ "ATS2p",
826
+ "ATS2s",
827
+ "CrippenLogP",
828
+ "ATS2i",
829
+ "JGT",
830
+ "MPC10",
831
+ "ndNH",
832
+ "VAdjMat",
833
+ "khs.ddssS",
834
+ "nT7Ring",
835
+ "khs.dsCH",
836
+ "ATSC6p",
837
+ "ATSC6s",
838
+ "ATSC6v",
839
+ "ATSC6i",
840
+ "ATSC6m",
841
+ "ATSC6c",
842
+ "ATSC6e",
843
+ "SpMin1_Bhi",
844
+ "SpMin1_Bhm",
845
+ "SpMin1_Bhp",
846
+ "SpMin1_Bhs",
847
+ "nT11HeteroRing",
848
+ "SpMin1_Bhv",
849
+ "SHother",
850
+ "AATS0s",
851
+ "SpMin4_Bhv",
852
+ "AATS0p",
853
+ "SpMin4_Bhp",
854
+ "AATS0v",
855
+ "SpMin4_Bhs",
856
+ "SpMin4_Bhm",
857
+ "AATS0i",
858
+ "SpMin4_Bhi",
859
+ "AATS0m",
860
+ "minsssCH",
861
+ "SpMin4_Bhe",
862
+ "nAtomLAC",
863
+ "AATS0e",
864
+ "nsCH3",
865
+ "MWC3",
866
+ "ATSC5v",
867
+ "MLFER_S",
868
+ "ETA_dBetaP",
869
+ "AATSC4p",
870
+ "nRotBt",
871
+ "nsOm",
872
+ "SHaaNH",
873
+ "nsOH",
874
+ "AATSC5v",
875
+ "AATSC5s",
876
+ "nssssNp",
877
+ "AATSC5e",
878
+ "naasN",
879
+ "AATSC5c",
880
+ "AATSC5m",
881
+ "nsssN",
882
+ "SpMax_Dt",
883
+ "AATSC5i",
884
+ "naasC",
885
+ "VR3_D",
886
+ "VR1_D",
887
+ "VR1_Dt",
888
+ "ETA_Epsilon_2",
889
+ "MLogP",
890
+ "nHBAcc2",
891
+ "nHBAcc3",
892
+ "AMR",
893
+ "AMW",
894
+ "GATS6c",
895
+ "sumI",
896
+ "GATS6e",
897
+ "gmax",
898
+ "maxHssNH",
899
+ "MATS5s",
900
+ "maxsNH2",
901
+ "GATS6m",
902
+ "maxHBint8",
903
+ "maxHBint9",
904
+ "GATS6p",
905
+ "C1SP2",
906
+ "C1SP3",
907
+ "khs.tsC",
908
+ "maxHBint2",
909
+ "maxHBint3",
910
+ "maxHBint4",
911
+ "maxHBint5",
912
+ "maxHBint6",
913
+ "maxHBint7",
914
+ "AVP-6",
915
+ "nHdNH",
916
+ "ATSC5e",
917
+ "C4SP3",
918
+ "AVP-3",
919
+ "ATSC5c",
920
+ "ATSC5m",
921
+ "nHother",
922
+ "ATSC5i",
923
+ "VCH-5",
924
+ "VCH-7",
925
+ "VCH-6",
926
+ "Mse",
927
+ "nsF",
928
+ "DELS2",
929
+ "MATS8m",
930
+ "ATS3v",
931
+ "ATS3s",
932
+ "ATS3p",
933
+ "ATS3e",
934
+ "MATS8i",
935
+ "Kier2",
936
+ "Kier3",
937
+ "Kier1",
938
+ "HybRatio",
939
+ "ATS3i",
940
+ "MDEN-23",
941
+ "SHBint9",
942
+ "SHBint8",
943
+ "SHBint3",
944
+ "SHBint2",
945
+ "SHBint7",
946
+ "SHBint6",
947
+ "SHBint5",
948
+ "SHBint4",
949
+ "DELS",
950
+ "minHsNH2",
951
+ "nHeteroRing",
952
+ "GATS7e",
953
+ "ETA_Psi_1",
954
+ "mindssC",
955
+ "nwHBa",
956
+ "maxHBint10",
957
+ "mindNH",
958
+ "GATS7i",
959
+ "nHssNH",
960
+ "nAtom",
961
+ "Spe",
962
+ "khs.dS",
963
+ "khs.dO",
964
+ "maxwHBa",
965
+ "AATSC6p",
966
+ "AATSC6s",
967
+ "AATSC6v",
968
+ "AATSC6c",
969
+ "AATSC6e",
970
+ "AATSC6i",
971
+ "AATSC6m",
972
+ "SssssNp",
973
+ "AATSC7c",
974
+ "nssCH2",
975
+ "ASP-2",
976
+ "ASP-3",
977
+ "ASP-0",
978
+ "ASP-1",
979
+ "ASP-6",
980
+ "ASP-7",
981
+ "ASP-4",
982
+ "ASP-5",
983
+ "ATS0s",
984
+ "MATS8v",
985
+ "ATS0p",
986
+ "MATS8s",
987
+ "ATS0v",
988
+ "MATS8p",
989
+ "MATS8e",
990
+ "MATS8c",
991
+ "ATS0e",
992
+ "ATS0i",
993
+ "ATS0m",
994
+ "GGI9",
995
+ "GGI8",
996
+ "GGI1",
997
+ "GGI3",
998
+ "GGI2",
999
+ "GGI5",
1000
+ "GGI4",
1001
+ "GGI7",
1002
+ "GGI6",
1003
+ "nTRing",
1004
+ "nT10Ring",
1005
+ "TIC0",
1006
+ "TIC1",
1007
+ "TIC2",
1008
+ "TIC3",
1009
+ "TIC4",
1010
+ "TIC5",
1011
+ "maxsCl",
1012
+ "ntCH",
1013
+ "khs.aaCH",
1014
+ "ZMIC4",
1015
+ "ZMIC5",
1016
+ "ZMIC0",
1017
+ "ZMIC1",
1018
+ "ZMIC2",
1019
+ "ZMIC3",
1020
+ "minHother",
1021
+ "ATSC4c",
1022
+ "ATSC4e",
1023
+ "ATSC4i",
1024
+ "ATSC4m",
1025
+ "ATSC4s",
1026
+ "ATSC4p",
1027
+ "ATSC4v",
1028
+ "SpMax1_Bhs",
1029
+ "SpMax1_Bhp",
1030
+ "SpMax1_Bhv",
1031
+ "hmin",
1032
+ "SpMax1_Bhe",
1033
+ "SpMax1_Bhi",
1034
+ "SpMax1_Bhm",
1035
+ "MPC6",
1036
+ "nAtomP",
1037
+ "MPC4",
1038
+ "MPC5",
1039
+ "MPC2",
1040
+ "VR3_Dzv",
1041
+ "VR3_Dzs",
1042
+ "MPC8",
1043
+ "VR3_Dzp",
1044
+ "VR3_Dzm",
1045
+ "SpMAD_Dzp",
1046
+ "VR3_Dzi",
1047
+ "VR3_Dze",
1048
+ "SsF",
1049
+ "minaaO",
1050
+ "VR3_DzZ",
1051
+ "mintCH",
1052
+ "Sse",
1053
+ "C3SP2",
1054
+ "VR1_DzZ",
1055
+ "VR1_Dzp",
1056
+ "VR1_Dzs",
1057
+ "SdCH2",
1058
+ "SHtCH",
1059
+ "VR1_Dzi",
1060
+ "VR1_Dzm",
1061
+ "VR1_Dze",
1062
+ "maxdsN",
1063
+ "AATSC7v",
1064
+ "AATSC7s",
1065
+ "AATSC7p",
1066
+ "AATSC7m",
1067
+ "AATSC7i",
1068
+ "nHdsCH",
1069
+ "AATSC7e",
1070
+ "BIC2",
1071
+ "BIC3",
1072
+ "BIC0",
1073
+ "BIC1",
1074
+ "SIC5",
1075
+ "SIC4",
1076
+ "SIC1",
1077
+ "SIC0",
1078
+ "SIC3",
1079
+ "SIC2",
1080
+ "naaCH",
1081
+ "minHBd",
1082
+ "minHBa",
1083
+ "AATSC1p",
1084
+ "nssO",
1085
+ "AATSC0i",
1086
+ "ALogp2",
1087
+ "nssS",
1088
+ "AATSC1i",
1089
+ "SaaS",
1090
+ "SaaO",
1091
+ "SaaN",
1092
+ "maxsBr",
1093
+ "GATS8m",
1094
+ "SpMax2_Bhv",
1095
+ "GATS8i",
1096
+ "SpMax2_Bhs",
1097
+ "GATS8e",
1098
+ "GATS8c",
1099
+ "SpMax2_Bhe",
1100
+ "SpMax2_Bhm",
1101
+ "GATS8v",
1102
+ "GATS8p",
1103
+ "GATS8s",
1104
+ "piPC3",
1105
+ "piPC2",
1106
+ "piPC1",
1107
+ "piPC7",
1108
+ "piPC6",
1109
+ "piPC5",
1110
+ "piPC4",
1111
+ "piPC9",
1112
+ "piPC8",
1113
+ "maxHdsCH",
1114
+ "nT11Ring",
1115
+ "ATS1v",
1116
+ "ATS1p",
1117
+ "ATS1s",
1118
+ "ATS1i",
1119
+ "SpMAD_Dt",
1120
+ "ATS1e",
1121
+ "VR2_Dzi",
1122
+ "n6HeteroRing",
1123
+ "MPC3",
1124
+ "ATS2e",
1125
+ "VR2_Dzv",
1126
+ "minHBint9",
1127
+ "VE2_Dzs",
1128
+ "VE2_Dzp",
1129
+ "VE2_Dzv",
1130
+ "ATS2m",
1131
+ "VE2_Dzi",
1132
+ "VE2_Dzm",
1133
+ "maxtCH",
1134
+ "minaaNH",
1135
+ "VE2_Dze",
1136
+ "VE2_DzZ",
1137
+ "nHAvin",
1138
+ "meanI",
1139
+ "nHCsatu",
1140
+ "nHCsats",
1141
+ "apol",
1142
+ "ATS5i",
1143
+ "nF12Ring",
1144
+ "mindS",
1145
+ "mindO",
1146
+ "MolIP",
1147
+ "maxdsCH",
1148
+ "ndCH2",
1149
+ "TopoPSA",
1150
+ "ETA_EtaP_B_RC",
1151
+ "MDEO-11",
1152
+ "MDEO-12",
1153
+ "AATSC0s",
1154
+ "SpMax5_Bhv",
1155
+ "AATSC0p",
1156
+ "SpMax5_Bhs",
1157
+ "AATSC0v",
1158
+ "SpMax5_Bhp",
1159
+ "SpMax5_Bhm",
1160
+ "SpMax5_Bhi",
1161
+ "AATSC0c",
1162
+ "SpMax5_Bhe",
1163
+ "AATSC0e",
1164
+ "EE_D",
1165
+ "VE3_DzZ",
1166
+ "C3SP3",
1167
+ "VE3_Dzv",
1168
+ "minddssS",
1169
+ "ATS6s",
1170
+ "VE3_Dzs",
1171
+ "VE3_Dzp",
1172
+ "ATS6v",
1173
+ "ATS6i",
1174
+ "VE3_Dzm",
1175
+ "ATS6m",
1176
+ "VE3_Dzi",
1177
+ "VE3_Dze",
1178
+ "ATS6e",
1179
+ "nTG12HeteroRing",
1180
+ "VPC-6",
1181
+ "VPC-5",
1182
+ "VPC-4",
1183
+ "MLFER_E",
1184
+ "nBondsD2",
1185
+ "nT12Ring",
1186
+ "Mpe",
1187
+ "maxHdCH2",
1188
+ "nT5HeteroRing",
1189
+ "nHeavyAtom",
1190
+ "nRing",
1191
+ "GATS5c",
1192
+ "nF12HeteroRing",
1193
+ "GATS5e",
1194
+ "VR1_Dzv",
1195
+ "minsssN",
1196
+ "topoShape",
1197
+ "ndO",
1198
+ "ndS",
1199
+ "nssNH",
1200
+ "VE1_Dt",
1201
+ "maxHaaCH",
1202
+ "nHBAcc",
1203
+ "VE3_D",
1204
+ "nsCl",
1205
+ "VE1_D",
1206
+ "AATSC1s",
1207
+ "AATSC1v",
1208
+ "AATSC1m",
1209
+ "AATSC1c",
1210
+ "AATSC1e",
1211
+ "LipoaffinityIndex",
1212
+ "n6Ring",
1213
+ "ETA_Eta",
1214
+ "WTPT-1",
1215
+ "WTPT-2",
1216
+ "WTPT-3",
1217
+ "WTPT-4",
1218
+ "WTPT-5",
1219
+ "ETA_EtaP_L",
1220
+ "ETA_EtaP_F",
1221
+ "ETA_EtaP_B",
1222
+ "nT5Ring",
1223
+ "SHdNH",
1224
+ "ETA_dEpsilon_C",
1225
+ "MDEO-22",
1226
+ "is_toxic"
1227
+ ]
1228
+
1229
+ features_types_per_config = {
1230
+ "toxicity": {f: datasets.Value("float32") for f in _BASE_FEATURE_NAMES[:-1]}
1231
+ }
1232
+ features_types_per_config["toxicity"]["is_toxic"] = datasets.ClassLabel(num_classes=2)
1233
+
1234
+
1235
+ class ToxicityConfig(datasets.BuilderConfig):
1236
+ def __init__(self, **kwargs):
1237
+ super(ToxicityConfig, self).__init__(version=VERSION, **kwargs)
1238
+ self.features = features_per_config[kwargs["name"]]
1239
+
1240
+
1241
+ class Toxicity(datasets.GeneratorBasedBuilder):
1242
+ # dataset versions
1243
+ DEFAULT_CONFIG = "toxicity"
1244
+ BUILDER_CONFIGS = [
1245
+ ToxicityConfig(name="toxicity",
1246
+ description="Toxicity for binary classification.")
1247
+ ]
1248
+
1249
+
1250
+ def _info(self):
1251
+ if self.config.name not in features_per_config:
1252
+ raise ValueError(f"Unknown configuration: {self.config.name}")
1253
+
1254
+ info = datasets.DatasetInfo(description=DESCRIPTION, citation=_CITATION, homepage=_HOMEPAGE,
1255
+ features=features_per_config[self.config.name])
1256
+
1257
+ return info
1258
+
1259
+ def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
1260
+ downloads = dl_manager.download_and_extract(urls_per_split)
1261
+
1262
+ return [
1263
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloads["train"]})
1264
+ ]
1265
+
1266
+ def _generate_examples(self, filepath: str):
1267
+ data = pandas.read_csv(filepath).infer_objects()
1268
+ data = data.rename({"Class": "is_toxic"})
1269
+ data = self.preprocess(data, config=self.config.name)
1270
+
1271
+ for row_id, row in data.iterrows():
1272
+ data_row = dict(row)
1273
+
1274
+ yield row_id, data_row
1275
+
1276
+ def preprocess(self, data: pandas.DataFrame, config: str = DEFAULT_CONFIG) -> pandas.DataFrame:
1277
+ data.loc[:, "is_toxic"] = data["is_toxic"].apply(lambda x: 1 if x == "Toxic" else 0)
1278
+
1279
+ return data