mgyigit commited on
Commit
d5eb7fd
1 Parent(s): dc93622

Update src/saving_utils.py

Browse files
Files changed (1) hide show
  1. src/saving_utils.py +8 -6
src/saving_utils.py CHANGED
@@ -41,15 +41,17 @@ def save_similarity_output(output_dict, method_name, leaderboard_path="/home/use
41
 
42
  # Process correlation if present
43
  if correlation_key in output_dict:
44
- correlation_values.append(output_dict[correlation_key])
45
- similarity_df.at[similarity_df['Method'] == method_name, f"{dataset}_{aspect}_correlation"] = output_dict[correlation_key]
46
- leaderboard_df.at[leaderboard_df['Method'] == method_name, f"sim_{dataset}_{aspect}_correlation"] = output_dict[correlation_key]
 
47
 
48
  # Process pvalue if present
49
  if pvalue_key in output_dict:
50
- pvalue_values.append(output_dict[pvalue_key])
51
- similarity_df.at[similarity_df['Method'] == method_name, f"{dataset}_{aspect}_pvalue"] = output_dict[pvalue_key]
52
- leaderboard_df.at[leaderboard_df['Method'] == method_name, f"sim_{dataset}_{aspect}_pvalue"] = output_dict[pvalue_key]
 
53
 
54
  # Calculate averages if all three aspects (MF, BP, CC) are present
55
  if len(correlation_values) == 3:
 
41
 
42
  # Process correlation if present
43
  if correlation_key in output_dict:
44
+ correlation = output_dict[correlation_key].item()
45
+ correlation_values.append(correlation)
46
+ similarity_df.at[similarity_df['Method'] == method_name, f"{dataset}_{aspect}_correlation"] = correlation
47
+ leaderboard_df.at[leaderboard_df['Method'] == method_name, f"sim_{dataset}_{aspect}_correlation"] = correlation
48
 
49
  # Process pvalue if present
50
  if pvalue_key in output_dict:
51
+ pvalue = output_dict[pvalue_key].item()
52
+ pvalue_values.append(pvalue)
53
+ similarity_df.at[similarity_df['Method'] == method_name, f"{dataset}_{aspect}_pvalue"] = pvalue
54
+ leaderboard_df.at[leaderboard_df['Method'] == method_name, f"sim_{dataset}_{aspect}_pvalue"] = pvalue
55
 
56
  # Calculate averages if all three aspects (MF, BP, CC) are present
57
  if len(correlation_values) == 3: