fix(Evaluation): correlation test should work on a per asset level, not per model level (#142)

* fix(Evaluation): correlation test should work on a per asset level, not per model level

* fix(Evaluation): correlations series initalized correctly

* fix(Reporting): don't name the run after the incorrectly supposed model_type

* fix(Reporting): put back send_report_to_wandb() into its original place

* fix(CI): sending reports again in comment
This commit is contained in:
Mark Aron Szulyovszky
2022-01-10 14:17:06 +01:00
committed by GitHub
parent ba2ab752d2
commit 73cfc67336
4 changed files with 7 additions and 21 deletions
-13
View File
@@ -55,14 +55,6 @@ def evaluate_predictions(
df = __preprocess(target_returns, y_pred, y_true, method, no_of_classes, discretize)
scorecard = pd.Series()
# we probably will not need regression models at all
# if method == 'regression':
# scorecard.loc['RSQ'] = r2_score(df.target_returns, df.y_pred)
# scorecard.loc['MAE'] = mean_absolute_error(df.target_returns, df.y_pred)
# elif method == 'classification':
# scorecard.loc['RSQ'] = 0.
# scorecard.loc['MAE Matrix'] = 0.
def count_non_zero(series: pd.Series) -> int:
return len(series[series != 0])
@@ -95,11 +87,6 @@ def evaluate_predictions(
for index, row in df.sign_pred.value_counts().iteritems():
scorecard.loc['sign_pred_ratio_' + str(index)] = row / len(df.sign_pred)
# if method == 'regression':
# scorecard.loc['edge_to_mae'] = scorecard.loc['edge'] / scorecard.loc['MAE']
# elif method == 'classification':
# scorecard.loc['edge_to_mae'] = 0.
scorecard = scorecard.round(3)
if print_results:
print("Model name: ", model_name)