11
11
12
12
SEC = 120
13
13
14
+
14
15
def define_and_evaluate_autogluon_pipeline (X , y , random_state = 0 ):
15
16
# autogluon dataframes
16
17
data_df = pd .DataFrame (X )
@@ -21,11 +22,11 @@ def define_and_evaluate_autogluon_pipeline(X, y, random_state=0):
21
22
data_df_train = data_df .iloc [train_inds , :]
22
23
data_df_test = data_df .iloc [test_inds , :]
23
24
if len ((set (y ))) == 2 :
24
- eval_metric = ' roc_auc'
25
- problem_type = ' binary'
25
+ eval_metric = " roc_auc"
26
+ problem_type = " binary"
26
27
else :
27
- eval_metric = ' f1_weighted' # no multiclass auroc in autogluon
28
- problem_type = ' multiclass'
28
+ eval_metric = " f1_weighted" # no multiclass auroc in autogluon
29
+ problem_type = " multiclass"
29
30
predictor = task .fit (
30
31
data_df_train ,
31
32
"y" ,
@@ -71,5 +72,5 @@ def define_and_evaluate_autogluon_pipeline(X, y, random_state=0):
71
72
times = np .array (times )
72
73
73
74
# save everything to disk so we can make plots elsewhere
74
- with open (f"results/03_autogluon_NN_sec_ { SEC } .pickle" , "wb" ) as f :
75
- pickle .dump ((results , times ), f )
75
+ with open (f"results/03_autogluon_sec_ { SEC } .pickle" , "wb" ) as f :
76
+ pickle .dump ((results , times ), f )
0 commit comments