-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
The compute_metrics_reloaded.py
script currently outputs the segmentation performance metrics into CSV files:
utilities/compute_metrics/compute_metrics_reloaded.py
Lines 254 to 262 in 1e72f5d
# save as CSV | |
fname_output_csv = os.path.abspath(args.output) | |
df.to_csv(fname_output_csv, index=False) | |
print(f'Saved metrics to {fname_output_csv}.') | |
# save as CSV | |
fname_output_csv_mean = os.path.abspath(args.output.replace('.csv', '_mean.csv')) | |
df_mean.to_csv(fname_output_csv_mean, index=False) | |
print(f'Saved mean and standard deviation of metrics across all subjects to {fname_output_csv_mean}.') |
The CSV files might be tricky to read in the terminal (due to CSV formatting).
A possible solution is to use a workaround such as function column_csv { column -t -s $';' ${1} }
, followed by column_csv <file.csv>
. But this does not work well if the CSV file has a lot of columns.
--> we can explore other ways how to save the metrics, such as pandas.DataFrame.to_markdown.