diff --git a/plotsandgraphs/multiclass_classifier.py b/plotsandgraphs/multiclass_classifier.py index 0198e10..02c21de 100644 --- a/plotsandgraphs/multiclass_classifier.py +++ b/plotsandgraphs/multiclass_classifier.py @@ -265,7 +265,7 @@ def auroc_metric_function(y_true, y_score, average, multi_class): ax.grid(True, linestyle=":", axis="both") # save auroc comparison plot - if save_fig_path and split_plots is True: + if save_fig_path and split_plots is True and fig_aurocs is not None: path = Path(save_fig_path[1]) path.parent.mkdir(parents=True, exist_ok=True) fig_aurocs.savefig(path, bbox_inches="tight")