Skip to content

Commit

Permalink
fake beta column if necessary and filter out regionprops and efd for …
Browse files Browse the repository at this point in the history
…f1 Vs Mse comparison
  • Loading branch information
afoix committed Jul 29, 2024
1 parent 251d85f commit 932b13a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripts/shapeembed/gather_run_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ def main_process(clargs, logger=logging.getLogger(__name__)):
else:
df['umap'] = f'nofile'

# NA desired columns if not already present
if 'beta' not in df.keys():
df['beta'] = pd.NA

## pair up with barplot
#barplot = f'scores_barplot.pdf'
#if os.path.isfile(f'{d}/{barplot}'):
Expand Down Expand Up @@ -166,8 +170,13 @@ def keep_first_fname(series):
# table results for f1 and mse comparison
simple_table(df, f'{clargs.output_dir}/table_top40_f1', sort_by_col='test_f1')
simple_table(df, f'{clargs.output_dir}/table_top40_mse', sort_by_col='mse/test', ascending=True)
compare_f1_mse_table(df, f'{clargs.output_dir}/table_top5_compare', best_n=5)
trial_table(df, f'{clargs.output_dir}/trials')
# temporarily drop regionprops and efd rows for F1 and MSE comparison
dff = df[(df['trial'] != 'regionprops') & (df['trial'] != 'efd')]
compare_f1_mse_table(dff, f'{clargs.output_dir}/table_top5_compare', best_n=5)
if 'regionprops' in df['trial'].values and 'efd' in df['trial'].values:
trial_table(df, f'{clargs.output_dir}/trials')
else:
logger.info('skipped trial table comparison (need both regionprops and efd results)')

# mse / f1 plots
dff=df[df['mse/test']<df['mse/test'].quantile(0.9)] # drop mse outlier
Expand Down

0 comments on commit 932b13a

Please sign in to comment.