New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kappa score cannot return 1 #14256
Comments
Arguably Kappa should be 0 in such a case. Performance is as good as random.
|
Bit lack of explanation. The above example is assumed that rating range is from 1 to 3 and evaluator rating is all one. I guess, it should be one. Do I have any mis-understandings? Anyway, I think that kappa score must return some value no matter what correct value is. In real rating operation, it often occurs. |
Kappa is designed to correct for chance where the probability distribution
is determined from the data. If the data says the distribution is peaked,
Kappa doesn't care that there could have been another two choices.
|
Returning nan is consistent with libraries such as tensorflow: import numpy as np
import tensorflow_addons as tfa
y_true = np.ones(5, dtype=np.int32)
y_pred = np.ones(5, dtype=np.int32)
metric = tfa.metrics.CohenKappa(num_classes=2, sparse_labels=True)
metric.update_state(y_true , y_pred)
result = metric.result()
result.numpy()
# nan If we want to be flexible here, we can add a |
Description
Cohen kappa score cannot return 1 in fully matched.
Steps/Code to Reproduce
Expected Results
Theoretically, kappa must return 1.0 in fully matched.
Actual Results
nan
Versions
The text was updated successfully, but these errors were encountered: