[bb7f56]: / utils / eval_util.py

Download this file

9 lines (6 with data), 307 Bytes

1
2
3
4
5
6
7
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()]