Spaces:
Sleeping
Sleeping
Update src/saving_utils.py
Browse files- 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 |
-
|
45 |
-
|
46 |
-
|
|
|
47 |
|
48 |
# Process pvalue if present
|
49 |
if pvalue_key in output_dict:
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
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:
|