Class Imbalance
Definition
Class imbalance occurs when target classes in a dataset appear with very different frequencies.
With strongly imbalanced classes, accuracy can be misleading. Suitable metrics, sampling, weighting, and thresholds depend on the error cost profile.
Simply explained
Like a test with 990 normal and only 10 rare cases – a model can ignore almost everything and still achieve high accuracy.
Why it matters in practice
Relevant for fraud, failures, quality defects, and rare events.
Example from business
A defect classifier is evaluated with precision, recall, and PR-AUC instead of just accuracy.
Limits and pitfalls
- Use accuracy in isolation; artificially change test distribution; perform oversampling before data split; ignore business costs of errors.
Origin & history
Class imbalance is a long-studied problem in machine learning; He and Garcia summarized methods and challenges in 2009.
Use in mid-sized companies
- Possible application in SMEs: Define error costs, data distribution, and evaluation metrics before model training.
Frequently asked questions
Is SMOTE always useful?
No. Which metric fits? That depends on the ratio of False Positives to False Negatives.
Sources
- Learning from Imbalanced Data · He & Garcia (2009), Learning from Imbalanced Data
- Introduction, Abschnitt 1.2 · imbalanced-learn, Introduction, Abschnitt 1.2
Source check: 10./11.10.2026.
Editorially reviewed on: