chore(Project): added output folder (#124)

* chore(Project): added output folder

* chore(CI): updated path

* fix(CI): correct path
This commit is contained in:
Mark Aron Szulyovszky
2022-01-07 19:03:17 +01:00
committed by GitHub
parent 57f63f1e93
commit f8af5641e8
5 changed files with 163 additions and 7 deletions
+3 -3
View File
@@ -11,12 +11,12 @@ def report_results(results:pd.DataFrame, all_predictions:pd.DataFrame, model_con
# Only send the results of the final model to wandb
results_to_send = level2_columns if level2_columns.shape[1] > 0 else level1_columns
send_report_to_wandb(results_to_send, wandb, project_name, get_model_name(model_config))
results.to_csv('results.csv')
results.to_csv('output/results.csv')
level1_predictions = all_predictions[[column for column in all_predictions.columns if 'lvl1' in column]]
level2_predictions = all_predictions[[column for column in all_predictions.columns if 'lvl2' in column]]
predictions_to_save = level2_predictions if level2_predictions.shape[1] > 0 else level1_predictions
predictions_to_save.to_csv('predictions.csv')
predictions_to_save.to_csv('output/predictions.csv')
print("\n--------\n")
all_avg_results = weighted_average(results, 'no_of_samples')
@@ -34,7 +34,7 @@ def report_results(results:pd.DataFrame, all_predictions:pd.DataFrame, model_con
print("Mean Sharpe ratio for Level-2 (Ensemble) models: ", round(lvl2_avg_results.loc['sharpe'].mean(), 3))
print("Mean Probabilistic Sharpe ratio for Level-2 (Ensemble) models: ", round(lvl2_avg_results.loc['prob_sharpe'].mean(), 3))
lvl2_avg_results.to_csv('results_level2.csv')
lvl2_avg_results.to_csv('output/results_level2.csv')
if sweep:
if wandb.run is not None: