Skip to content

Commit

Permalink
#2191 - Agreement does not take tagset into account
Browse files Browse the repository at this point in the history
- Adjust based on discussion at dkpro/dkpro-statistics#35
  • Loading branch information
reckart committed Apr 17, 2021
1 parent 8086a16 commit ecb3bd3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ public double calculateAgreement()
double D_O = calculateObservedDisagreement();
double D_E = calculateExpectedDisagreement();
if (D_O == 0.0 && D_E == 0.0) {
return 1.0;
if (study.getItemCount() == 0) {
return Double.NaN;
}
else {
return 1.0;
}
}
return 1.0 - (D_O / D_E);
}
Expand Down

0 comments on commit ecb3bd3

Please sign in to comment.