From 1318ae36091be86a2becdb84ab846a5d3a93d57f Mon Sep 17 00:00:00 2001 From: junos Date: Thu, 18 May 2023 18:55:31 +0200 Subject: [PATCH] Rename methods to make them consistent with regression methods. --- machine_learning/helper.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/machine_learning/helper.py b/machine_learning/helper.py index 177f608..280d58c 100644 --- a/machine_learning/helper.py +++ b/machine_learning/helper.py @@ -445,7 +445,7 @@ def run_all_classification_models( scores_df = pd.DataFrame(dummy_score)[test_metrics] scores_df = aggregate_and_transpose(scores_df, statistics=["max", "mean"]) - scores_df["method"] = "Dummy" + scores_df["method"] = "dummy_classifier" scores = pd.concat([scores, scores_df]) del dummy_class del dummy_score @@ -465,7 +465,7 @@ def run_all_classification_models( scores_df = pd.DataFrame(log_reg_scores)[test_metrics] scores_df = aggregate_and_transpose(scores_df, statistics=["max", "mean"]) - scores_df["method"] = "logistic_reg" + scores_df["method"] = "logistic_regression" scores = pd.concat([scores, scores_df]) del logistic_regression del log_reg_scores @@ -485,7 +485,7 @@ def run_all_classification_models( scores_df = pd.DataFrame(svc_scores)[test_metrics] scores_df = aggregate_and_transpose(scores_df, statistics=["max", "mean"]) - scores_df["method"] = "svc" + scores_df["method"] = "SVC" scores = pd.concat([scores, scores_df]) del svc del svc_scores @@ -525,7 +525,7 @@ def run_all_classification_models( scores_df = pd.DataFrame(sgdc_scores)[test_metrics] scores_df = aggregate_and_transpose(scores_df, statistics=["max", "mean"]) - scores_df["method"] = "stochastic_gradient_descent" + scores_df["method"] = "stochastic_gradient_descent_classifier" scores = pd.concat([scores, scores_df]) del sgdc del sgdc_scores @@ -545,7 +545,7 @@ def run_all_classification_models( scores_df = pd.DataFrame(rfc_scores)[test_metrics] scores_df = aggregate_and_transpose(scores_df, statistics=["max", "mean"]) - scores_df["method"] = "random_forest" + scores_df["method"] = "random_forest_classifier" scores = pd.concat([scores, scores_df]) del rfc del rfc_scores @@ -565,7 +565,7 @@ def run_all_classification_models( scores_df = pd.DataFrame(xgb_scores)[test_metrics] scores_df = aggregate_and_transpose(scores_df, statistics=["max", "mean"]) - scores_df["method"] = "xgboost" + scores_df["method"] = "XGBoost_classifier" scores = pd.concat([scores, scores_df]) del xgb_classifier del xgb_scores