R-What is Kappa coefficient?

While learning logistic regression, I had question that while evaluating model only considering accuracy or error rate is fine or should we have any other parameter to consider. I an got to know that, we should consider Kappa value to check the robustness of the model means accuracy we are getting is not by chance.

What is Kappa Coefficient or Cohen's Kappa value?

It is used to calculate the agreement between the two types of values in our case actual values and predicted values. It compares observed/predicted accuracy with the expected/actual accu

Formula -

Kappa = (Observed accuracy - Expected accuracy)/(1 - Expected accuracy)

Let us consider following contingency table where we have actual and predicted values.


  • Poor agreement = Less than 0.20

  • Fair agreement = 0.20 to 0.40

  • Moderate agreement = 0.40 to 0.60

  • Good agreement = 0.60 to 0.80

  • Very good agreement = 0.80 to 1.00


About Author

✔ 13+ years of experience in the Software Industry; Over 6.5+ years of experience in machine learning and deep learning projects.

✔ Hands-on Data Science practitioner; a Leading team of data scientists, Python developers, UI developers, and business analysts for multi-million dollar projects

✔ Designed and developed DevOps enabled MLOPs strategy and components from scratch which had saved 80% data annotation and 40% development time for clients.

Featured Posts
Search By Tags
No tags yet.