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