Skip to content

Commit

Permalink
added explicit classifier column to scoring dataframes and updated ga…
Browse files Browse the repository at this point in the history
…ther results accordingly
  • Loading branch information
afoix committed Oct 21, 2024
1 parent 74fe9d0 commit 099b666
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/shapeembed/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def score_dataframe( df, name
# Put the results into a DataFrame
df = pandas.DataFrame(cv_results)
df = df.drop(["fit_time", "score_time"], axis=1)
df.insert(loc=0, column='trial', value=f'{name}_{pipename}')
df.insert(loc=0, column='classifier', value=pipename)
df.insert(loc=0, column='trial', value=name)
tag_columns.reverse()
for tag_col_name, tag_col_value in tag_columns:
df.insert(loc=0, column=tag_col_name, value=tag_col_value)
Expand Down
2 changes: 1 addition & 1 deletion scripts/shapeembed/gather_run_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def main_process(clargs, logger=logging.getLogger(__name__)):
# function for finding total
def keep_first_fname(series):
return functools.reduce(lambda x, y: y if str(x) == 'nofile' else x, series)
idx_cols = ['trial', 'dataset', 'model', 'compression_factor', 'latent_dim', 'batch_size']
idx_cols = ['trial', 'classifier', 'dataset', 'model', 'compression_factor', 'latent_dim', 'batch_size']
df.set_index(idx_cols, inplace=True)
df.sort_index(inplace=True)
#df = df.groupby(level=['trial', 'dataset', 'model', 'compression_factor', 'latent_dim', 'batch_size']).agg({
Expand Down

0 comments on commit 099b666

Please sign in to comment.