-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path003_jannis.py
More file actions
527 lines (517 loc) · 32.1 KB
/
Copy path003_jannis.py
File metadata and controls
527 lines (517 loc) · 32.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
import argparse
import os
import numpy as np
import autosklearn
import autosklearn.data
import autosklearn.data.competition_data_manager
from autosklearn.pipeline.classification import SimpleClassificationPipeline
parser = argparse.ArgumentParser()
parser.add_argument('input')
parser.add_argument('output')
args = parser.parse_args()
input = args.input
dataset = 'jannis'
output = args.output
path = os.path.join(input, dataset)
D = autosklearn.data.competition_data_manager.CompetitionDataManager(path)
X = D.data['X_train']
y = D.data['Y_train']
X_valid = D.data['X_valid']
X_test = D.data['X_test']
# Replace the following array by a new ensemble
choices = \
[(0.160000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 0.8230378717081245,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 19,
'classifier:random_forest:min_samples_split': 8,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.0015176084175820871,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'True',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'entropy',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 2.6233562705637476,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 3,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 16,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'standardize'})),
(0.100000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 4.669880400352936,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 19,
'classifier:random_forest:min_samples_split': 7,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.007886826567333378,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'True',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'entropy',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 2.7007942047071865,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 1,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 12,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'standardize'})),
(0.100000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 1.406221097074635,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 19,
'classifier:random_forest:min_samples_split': 12,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.0035146367585256835,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'False',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'entropy',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 2.4922383207655763,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 3,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 11,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'standardize'})),
(0.100000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 3.0766500993287544,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 19,
'classifier:random_forest:min_samples_split': 6,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.0052442759651766795,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'False',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'entropy',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 2.8345876814556745,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 2,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 5,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'min/max'})),
(0.080000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 3.992423276448683,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 20,
'classifier:random_forest:min_samples_split': 6,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.005060149532495579,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'True',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'gini',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 2.9176773896808106,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 4,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 11,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'standardize'})),
(0.080000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 1.8427415302457764,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 19,
'classifier:random_forest:min_samples_split': 11,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.006094139631443715,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'False',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'entropy',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 2.9054667656168744,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 5,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 9,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'standardize'})),
(0.060000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 1.4679336412447643,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 20,
'classifier:random_forest:min_samples_split': 7,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'most_frequent',
'one_hot_encoding:minimum_fraction': 0.013856064466225412,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'False',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'gini',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 2.821607178538829,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 1,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 2,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'min/max'})),
(0.060000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 1.3155071079117242,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 20,
'classifier:random_forest:min_samples_split': 8,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.0035361733150731144,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'False',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'gini',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 1.0918950483680085,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 1,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 5,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'standardize'})),
(0.040000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 4.940497229306341,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 20,
'classifier:random_forest:min_samples_split': 7,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.01824307123711416,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'True',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'gini',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 3.491200900865445,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 6,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 8,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'min/max'})),
(0.040000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 4.000546197252823,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 19,
'classifier:random_forest:min_samples_split': 18,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'most_frequent',
'one_hot_encoding:minimum_fraction': 0.004487818890097931,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'False',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'entropy',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 4.913797450061312,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 1,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 10,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'none'})),
(0.020000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 4.412130298506767,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 19,
'classifier:random_forest:min_samples_split': 11,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'median',
'one_hot_encoding:minimum_fraction': 0.008149946091382478,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'False',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'gini',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 2.821331241321694,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 8,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 2,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'standardize'})),
(0.020000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'entropy',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 2.585334606852488,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 15,
'classifier:random_forest:min_samples_split': 2,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'most_frequent',
'one_hot_encoding:use_minimum_fraction': 'False',
'preprocessor:__choice__': 'select_rates',
'preprocessor:select_rates:alpha': 0.31154541628607907,
'preprocessor:select_rates:mode': 'fwe',
'preprocessor:select_rates:score_func': 'f_classif',
'rescaling:__choice__': 'none'})),
(0.020000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'entropy',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 2.660106264030751,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 20,
'classifier:random_forest:min_samples_split': 19,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'median',
'one_hot_encoding:minimum_fraction': 0.00023797748625219528,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'False',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'entropy',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 2.711779030141609,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 1,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 5,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'min/max'})),
(0.020000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 4.311155499004128,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 19,
'classifier:random_forest:min_samples_split': 6,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.0045832519735911365,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'True',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'entropy',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 2.4313384521470844,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 1,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 8,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'standardize'})),
(0.020000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'entropy',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 1.1283591217664084,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 20,
'classifier:random_forest:min_samples_split': 4,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.00016005125675672377,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'True',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'entropy',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 3.089911925114402,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 4,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 5,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'min/max'})),
(0.020000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 1.0,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 19,
'classifier:random_forest:min_samples_split': 6,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.009337300926998802,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'True',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'entropy',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 2.851719023875125,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 3,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 7,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'standardize'})),
(0.020000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 4.940497229306341,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 20,
'classifier:random_forest:min_samples_split': 7,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.05798212052141874,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'False',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'gini',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 2.866480230834629,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 4,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 4,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'min/max'})),
(0.020000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'gini',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 3.377815501014255,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 19,
'classifier:random_forest:min_samples_split': 3,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'median',
'one_hot_encoding:minimum_fraction': 0.00935903671597016,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'False',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'entropy',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 3.926283104591668,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 1,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 7,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'min/max'})),
(0.020000, SimpleClassificationPipeline(configuration={
'balancing:strategy': 'weighting',
'classifier:__choice__': 'random_forest',
'classifier:random_forest:bootstrap': 'False',
'classifier:random_forest:criterion': 'entropy',
'classifier:random_forest:max_depth': 'None',
'classifier:random_forest:max_features': 2.8412937716906717,
'classifier:random_forest:max_leaf_nodes': 'None',
'classifier:random_forest:min_samples_leaf': 20,
'classifier:random_forest:min_samples_split': 20,
'classifier:random_forest:min_weight_fraction_leaf': 0.0,
'classifier:random_forest:n_estimators': 100,
'imputation:strategy': 'mean',
'one_hot_encoding:minimum_fraction': 0.004994082832266316,
'one_hot_encoding:use_minimum_fraction': 'True',
'preprocessor:__choice__': 'extra_trees_preproc_for_classification',
'preprocessor:extra_trees_preproc_for_classification:bootstrap': 'True',
'preprocessor:extra_trees_preproc_for_classification:criterion': 'entropy',
'preprocessor:extra_trees_preproc_for_classification:max_depth': 'None',
'preprocessor:extra_trees_preproc_for_classification:max_features': 4.139497534039955,
'preprocessor:extra_trees_preproc_for_classification:min_samples_leaf': 2,
'preprocessor:extra_trees_preproc_for_classification:min_samples_split': 15,
'preprocessor:extra_trees_preproc_for_classification:min_weight_fraction_leaf': 0.0,
'preprocessor:extra_trees_preproc_for_classification:n_estimators': 100,
'rescaling:__choice__': 'standardize'})),
]
targets = []
predictions = []
predictions_valid = []
predictions_test = []
# Make predictions and weight them
iteration = 0
for weight, classifier in choices:
iteration += 1
print(dataset, "Iteration %d/%d" % (iteration, len(choices)))
try:
classifier.fit(X.copy(), y.copy())
predictions_valid.append(
classifier.predict_proba(X_valid.copy()) * weight)
predictions_test.append(
classifier.predict_proba(X_test.copy()) * weight)
except Exception as e:
print(e)
print(classifier.configuration)
# Output the predictions
for name, predictions in [('valid', predictions_valid),
('test', predictions_test)]:
predictions = np.array(predictions)
predictions = np.sum(predictions, axis=0).astype(np.float32)
filepath = os.path.join(output, '%s_%s_000.predict' % (dataset, name))
np.savetxt(filepath, predictions, delimiter=' ', fmt='%.4e')