Skip to content
Snippets Groups Projects
Commit a676fb76 authored by lukas leufen's avatar lukas leufen
Browse files

Merge branch...

Merge branch 'lukas_issue358_bug_order-in-feature_importance_bootstrap_method-causes-crash' into 'develop'

Resolve "Bug: order in feature_importance_bootstrap_method causes crash"

See merge request !383
parents 3154fc50 68f21d53
Branches
Tags
4 merge requests!430update recent developments,!413update release branch,!412Resolve "release v2.0.0",!383Resolve "Bug: order in feature_importance_bootstrap_method causes crash"
Checking pipeline status
......@@ -1014,6 +1014,7 @@ class PostProcessing(RunEnvironment):
report_path = os.path.join(self.data_store.get("experiment_path"), "latex_report")
path_config.check_path_and_create(report_path)
res = []
max_cols = 0
for boot_type, d0 in results.items():
for boot_method, d1 in d0.items():
for station_name, vals in d1.items():
......@@ -1022,8 +1023,9 @@ class PostProcessing(RunEnvironment):
res.append([boot_type, boot_method, station_name, boot_var, ahead,
*vals.sel({self.boot_var_dim: boot_var,
self.ahead_dim: ahead}).values.round(5).tolist()])
max_cols = max(max_cols, len(res[-1]))
col_names = [self.model_type_dim, "method", "station", self.boot_var_dim, self.ahead_dim,
*list(range(len(res[0]) - 5))]
*list(range(max_cols - 5))]
df = pd.DataFrame(res, columns=col_names)
file_name = "feature_importance_skill_score_report_raw.csv"
df.to_csv(os.path.join(report_path, file_name), sep=";")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment