From 5db2a3b93544458af4a56db073b8eafe6e80fe3e Mon Sep 17 00:00:00 2001 From: Mark Aron Szulyovszky Date: Tue, 11 Jan 2022 19:44:01 +0100 Subject: [PATCH] fix(Reporting): identify primary models correctly with the new column names --- config/config.py | 2 +- reporting/reporting.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.py b/config/config.py index 24512a2..f5a2e87 100644 --- a/config/config.py +++ b/config/config.py @@ -110,7 +110,7 @@ def get_lightweight_ensemble_config() -> tuple[dict, dict, dict]: forecasting_horizon = 1, own_features = ['level_2' ], other_features = ['level_2'], - exogenous_features = ['standard_scaling'], + exogenous_features = ['z_score'], index_column= 'int', method= 'classification', no_of_classes= 'two', diff --git a/reporting/reporting.py b/reporting/reporting.py index 593beee..003ace6 100644 --- a/reporting/reporting.py +++ b/reporting/reporting.py @@ -5,7 +5,7 @@ from utils.helpers import weighted_average def report_results(results:pd.DataFrame, all_predictions:pd.DataFrame, model_config:dict, wandb, sweep: bool, project_name:str): - primary_results = results[[column for column in results.columns if 'primary' in column]] + primary_results = results[[column for column in results.columns if 'ensemble' not in column]] ensemble_results = results[[column for column in results.columns if 'ensemble' in column]] # Only send the results of the final model to wandb @@ -13,7 +13,7 @@ def report_results(results:pd.DataFrame, all_predictions:pd.DataFrame, model_con send_report_to_wandb(results_to_send, wandb, project_name, get_model_name(model_config)) results.to_csv('output/results.csv') - primary_weights = all_predictions[[column for column in all_predictions.columns if 'primary' in column]] + primary_weights = all_predictions[[column for column in all_predictions.columns if 'ensemble' not in column]] ensemble_weights = all_predictions[[column for column in all_predictions.columns if 'ensemble' in column]] predictions_to_save = ensemble_weights if ensemble_weights.shape[1] > 0 else primary_weights predictions_to_save.to_csv('output/predictions.csv')