Skip to content

Commit 6d88c7c

Browse files
committed
update metrics for human ai agg
1 parent 9da06ef commit 6d88c7c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/prompt_systematic_review/experiments/evaluate_human_agreement.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,18 @@ def evaluate_human_agreement(inputFile="arxiv_papers_with_abstract.csv"):
5757
agreement_grid = pd.crosstab(df_limited["AI_keep"], df_limited["human_review"])
5858

5959
true_positives = agreement_grid.loc[True, True]
60+
true_negatives = agreement_grid.loc[False, False]
6061
false_positives = agreement_grid.loc[True, False]
6162
false_negatives = agreement_grid.loc[False, True]
6263

64+
accuracy = (true_positives + true_negatives) / len(df_limited)
6365
precision = true_positives / (true_positives + false_positives)
6466
recall = true_positives / (true_positives + false_negatives)
6567

6668
f1_score = 2 * (precision * recall) / (precision + recall)
6769
print(f"Precision: {precision}")
6870
print(f"Recall: {recall}")
71+
print(f"Accuracy: {accuracy}")
6972
print(f"F1 Score: {f1_score}")
7073

7174

0 commit comments

Comments
 (0)