mgyigit commited on
Commit
7e80034
1 Parent(s): 2233ae0

Update src/saving_utils.py

Browse files
Files changed (1) hide show
  1. src/saving_utils.py +4 -4
src/saving_utils.py CHANGED
@@ -56,13 +56,13 @@ def save_similarity_output(output_dict, method_name, leaderboard_path="/home/use
56
  # Calculate averages if all three aspects (MF, BP, CC) are present
57
  if len(correlation_values) == 3:
58
  averages[f"{dataset}_Ave_correlation"] = sum(correlation_values) / 3
59
- similarity_df.at[similarity_df['Method'] == method_name, f"{dataset}_Ave_correlation"] = averages[f"{dataset}_Ave_correlation"]
60
- leaderboard_df.at[leaderboard_df['Method'] == method_name, f"sim_{dataset}_Ave_correlation"] = averages[f"{dataset}_Ave_correlation"]
61
 
62
  if len(pvalue_values) == 3:
63
  averages[f"{dataset}_Ave_pvalue"] = sum(pvalue_values) / 3
64
- similarity_df.at[similarity_df['Method'] == method_name, f"{dataset}_Ave_pvalue"] = averages[f"{dataset}_Ave_pvalue"]
65
- leaderboard_df.at[leaderboard_df['Method'] == method_name, f"sim_{dataset}_Ave_pvalue"] = averages[f"{dataset}_Ave_pvalue"]
66
 
67
  # Save the updated DataFrames back to CSV
68
  leaderboard_df.to_csv(leaderboard_path, index=False)
 
56
  # Calculate averages if all three aspects (MF, BP, CC) are present
57
  if len(correlation_values) == 3:
58
  averages[f"{dataset}_Ave_correlation"] = sum(correlation_values) / 3
59
+ similarity_df.loc[similarity_df['Method'] == method_name, f"{dataset}_Ave_correlation"] = averages[f"{dataset}_Ave_correlation"]
60
+ leaderboard_df.loc[leaderboard_df['Method'] == method_name, f"sim_{dataset}_Ave_correlation"] = averages[f"{dataset}_Ave_correlation"]
61
 
62
  if len(pvalue_values) == 3:
63
  averages[f"{dataset}_Ave_pvalue"] = sum(pvalue_values) / 3
64
+ similarity_df.loc[similarity_df['Method'] == method_name, f"{dataset}_Ave_pvalue"] = averages[f"{dataset}_Ave_pvalue"]
65
+ leaderboard_df.loc[leaderboard_df['Method'] == method_name, f"sim_{dataset}_Ave_pvalue"] = averages[f"{dataset}_Ave_pvalue"]
66
 
67
  # Save the updated DataFrames back to CSV
68
  leaderboard_df.to_csv(leaderboard_path, index=False)