Created
June 9, 2020 12:09
-
-
Save kzinmr/57ebb1eb90d5ba90330f8aabac09ccfa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_fp_examples(df, pred_col_name='score', gold_col_name='answer'): | |
df_fp = df[(df[pred_col_name] == 1) & (df[gold_col_name] == False)] | |
print(df_fp.shape) | |
return df_fp | |
def get_fn_examples(df, pred_col_name='score', gold_col_name='answer'): | |
df_fn = df[(df[pred_col_name] == 0) & (df[gold_col_name] == True)] | |
print(df_fn.shape) | |
return df_fn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment