Diff of /utils/eval_util.py [000000] .. [bb7f56]

Switch to side-by-side view

--- a
+++ b/utils/eval_util.py
@@ -0,0 +1,8 @@
+import pandas as pd
+
+
+def patient_based_filter(sub_df: pd.DataFrame):
+    """Filtered by the required `class_label`, then output the highest score"""
+    class_label = sub_df["class_label"].max()
+    b_cand = sub_df[sub_df["class_label"] == class_label]
+    return b_cand.loc[b_cand["pred_score"].idxmax()]