Skip to content

Commit e3c1bc6

Browse files
author
Sergey Feldman
committed
autogluon 120
1 parent 7795f2d commit e3c1bc6

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

03_autogluon.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
SEC = 120
1313

14+
1415
def define_and_evaluate_autogluon_pipeline(X, y, random_state=0):
1516
# autogluon dataframes
1617
data_df = pd.DataFrame(X)
@@ -21,11 +22,11 @@ def define_and_evaluate_autogluon_pipeline(X, y, random_state=0):
2122
data_df_train = data_df.iloc[train_inds, :]
2223
data_df_test = data_df.iloc[test_inds, :]
2324
if len((set(y))) == 2:
24-
eval_metric = 'roc_auc'
25-
problem_type = 'binary'
25+
eval_metric = "roc_auc"
26+
problem_type = "binary"
2627
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"
2930
predictor = task.fit(
3031
data_df_train,
3132
"y",
@@ -71,5 +72,5 @@ def define_and_evaluate_autogluon_pipeline(X, y, random_state=0):
7172
times = np.array(times)
7273

7374
# 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)
5.73 KB
Binary file not shown.

0 commit comments

Comments
 (0)