Cohen’s Kappa statistic

Cohen’s kappa statistic (κ) is a performance metric used to evaluate classification models, particularly in scenarios involving multiclass problems or imbalanced datasets. Its primary advantage over standard accuracy is that it accounts for the possibility of a classifier reaching a correct prediction purely by chance based on the frequency of each class.

1. Building Cohen’s Kappa

Cohen's kappa is derived from the values in a confusion matrix. It is built using two primary components: observed agreement (po​) and expected agreement (pe​).

Pasted image 20260319194442.png

Pasted image 20260319194515.png

2. How to Interpret Cohen’s Kappa

The value of Cohen’s kappa tells you how much better your model is performing compared to a random classifier.

3. Importance in Imbalanced Learning

Cohen’s kappa is highly valued in imbalanced learning because it prevents "fooling" the analyst with high accuracy scores on skewed data. In a dataset where one class dominates, a "dumb" model that always predicts the majority class would have high accuracy (po​), but its expected agreement (pe​) would also be very high. This would result in a low kappa score, correctly identifying the model as poor.

By subtracting pe​ from both the numerator and denominator, the metric effectively "normalizes" the performance, ensuring that a model must demonstrate genuine predictive power beyond what is expected by simple frequency-based guessing.

Powered by Forestry.md