fix(Reporting): use weighted average (with no_of_samples as weights) and only report level-1 OR level-2 model performance (#91)

* fix(Reporting): use weighted average (with no_of_samples as weights) and only report level-1 OR level-2 model performance

* chore(Config): updated sweep config

* fix(Reporting): missing import

* fix(Evaluation): get_first_valid_return_index can deal with zero valid indexes

* fix(Training): increase threshold for skipping assets

* fix(DataLoader): target asset should be always the first column
This commit is contained in:
Mark Aron Szulyovszky
2021-12-26 12:15:11 +01:00
committed by GitHub
parent fc4e59a7d2
commit a9b05dbd42
6 changed files with 41 additions and 19 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import pandas as pd
from typing import Optional
from utils.helpers import weighted_average
def launch_wandb(project_name:str, default_config:dict, sweep:bool=False):
from wandb_setup import get_wandb
@@ -34,7 +35,7 @@ def send_report_to_wandb(results: pd.DataFrame, wandb:Optional[object], project_
wandb.run.name = model_name+ "-" + wandb.run.id
wandb.run.save()
mean_results = results.mean(axis = 1)
mean_results = weighted_average(results, 'no_of_samples')
for key, value in mean_results.iteritems():
run.log({"model_type": model_name, key: value })