Skip to content

Commit

Permalink
Fleiss kappa bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
o-P-o committed Nov 24, 2019
1 parent 9e788ee commit 511bd8f
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions disagree/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,16 +471,3 @@ def alpha(self, data_type="nominal"):
return 1.

return 1 - (observed_disagreement / expected_disagreement)


if __name__ == "__main__":
test_annotations = {"a": [None, None, None, None, None, 1, 3, 0, 1, 0, 0, 2, 2, None, 2],
"b": [0, None, 1, 0, 2, 2, 3, 2, None, None, None, None, None, None, None],
"c": [None, None, 1, 0, 2, 3, 3, None, 1, 0, 0, 2, 2, None, 3]}

df = pd.DataFrame(test_annotations)
labels = [0, 1, 2, 3]

mets = Metrics(df, labels)
fleiss = mets.fleiss_kappa()
print(fleiss)

0 comments on commit 511bd8f

Please sign in to comment.