Skip to content
Snippets Groups Projects
Commit 3493ff60 authored by Jörg Martin's avatar Jörg Martin
Browse files

Create tabular updated

parent c44c4524
Branches
Tags
No related merge requests found
......@@ -3,7 +3,7 @@ import glob
import argparse
import json
metrics_to_display = ['rmse','logdens','bias','true_coverage_numerical']
metrics_to_display = ['rmse','logdens','bias','true_coverage_numerical','avg_bias']
show_incomplete = True
list_of_result_files = glob.glob(os.path.join('results','*.json'))
......@@ -19,7 +19,13 @@ def save_readout(dictionary, key):
the later doesn't exist, in which case (None,None) is returned.
"""
try:
return dictionary[key]
readout = dictionary[key]
if type(readout) is list:
assert len(readout) == 2
return readout
else:
readout = float(readout)
return (readout, None)
except KeyError:
return (None,None)
......@@ -40,7 +46,10 @@ for data in results.keys():
if metric_mean is None:
noneiv_results_string += ' None (None)'
else:
noneiv_results_string += f' {metric_mean:.3f} ({metric_std:.3f})'
if metric_std is not None:
noneiv_results_string += f' {metric_mean:.3f} ({metric_std:.3f})'
else:
noneiv_results_string += f' {metric_mean:.3f} (NaN)'
print(noneiv_results_string)
eiv_results = [save_readout(results[data]['eiv'],metric)
for metric in metrics_to_display]
......@@ -50,7 +59,10 @@ for data in results.keys():
if metric_mean is None:
eiv_results_string += ' None (None)'
else:
eiv_results_string += f' {metric_mean:.3f} ({metric_std:.3f})'
if metric_std is not None:
eiv_results_string += f' {metric_mean:.3f} ({metric_std:.3f})'
else:
eiv_results_string += f' {metric_mean:.3f} (NaN)'
print(eiv_results_string)
print(offset * '_' + 70 * '_')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment