Skip to content

Commit 5361ed3

Browse files
committed
Fix: ROC Folder Generated
1 parent e71c3e1 commit 5361ed3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Helpers/pipelines_main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ def external_test(X_train, y_train, X_test, y_test, params_dict, thresholds):
340340
# Detect if multiclass
341341
num_classes = len(np.unique(y_train))
342342
is_multiclass = num_classes > 2
343-
343+
os.makedirs(os.path.join("./Materials", "ROC_Curves"), exist_ok=True)
344+
roc_save = os.path.join("./Materials", "ROC_Curves")
344345
pipeline_dict_inf = {}
345346
params_inf= {}
346347
scores_inf = {}
@@ -395,8 +396,8 @@ def external_test(X_train, y_train, X_test, y_test, params_dict, thresholds):
395396
try:
396397
roc = behave_metrics.ROCCurveEvaluator(pipeline_dict_inf,X_test=X_test, y_true=y_test)
397398
roc.evaluate_models()
398-
roc.plot_roc_curves(save_path=r"./Materials")
399-
roc.plot_pr_curves(save_path=r"./Materials")
399+
roc.plot_roc_curves(save_path=roc_save)
400+
roc.plot_pr_curves(save_path=roc_save)
400401
except Exception as e:
401402
print(f"Error here: {e}")
402403

0 commit comments

Comments
 (0)