File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/prompt_systematic_review/experiments Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,18 @@ def evaluate_human_agreement(inputFile="arxiv_papers_with_abstract.csv"):
57
57
agreement_grid = pd .crosstab (df_limited ["AI_keep" ], df_limited ["human_review" ])
58
58
59
59
true_positives = agreement_grid .loc [True , True ]
60
+ true_negatives = agreement_grid .loc [False , False ]
60
61
false_positives = agreement_grid .loc [True , False ]
61
62
false_negatives = agreement_grid .loc [False , True ]
62
63
64
+ accuracy = (true_positives + true_negatives ) / len (df_limited )
63
65
precision = true_positives / (true_positives + false_positives )
64
66
recall = true_positives / (true_positives + false_negatives )
65
67
66
68
f1_score = 2 * (precision * recall ) / (precision + recall )
67
69
print (f"Precision: { precision } " )
68
70
print (f"Recall: { recall } " )
71
+ print (f"Accuracy: { accuracy } " )
69
72
print (f"F1 Score: { f1_score } " )
70
73
71
74
You can’t perform that action at this time.
0 commit comments