Class Imbalance, Exactly
Worked numerical examples showing how skewed label counts shape baselines, confusion tables, accuracy, and recall.
Class imbalance step by step
Count labels, test the majority baseline, and separate accuracy from positive recall and error cost.
- Label Counts Are Visible
inspect class counts and positive share before touching a metric
- Always-N Baseline
what a rule that predicts class 0 for every row gets right and misses
- Confusion Counts Show the Miss
separate true positives, false positives, false negatives, and true negatives
- Accuracy Is Four Out of Five
how (TP + TN) / N reaches 0.8 without catching a single positive row
- Positive Recall Is Zero
why TP / (TP + FN) reads 0.0 on the exact run where accuracy reads 0.8
- What Imbalance Does and Does Not Say
why class skew sets the accuracy floor while domain error cost picks the cutoff