What does 'data imbalance' mean and why is it a problem?
easyAnswer
- Data imbalance means classes are unequally represented (e.g., 99% negatives, 1% positives).
- A naive model can hit 99% accuracy by always predicting the majority class, learning nothing about the minority.
- It's a problem when the minority class is the one you actually care about (fraud, rare disease).
- Handle with resampling (SMOTE, undersampling), class weights, threshold tuning, appropriate metrics (PR-AUC, F1, recall at fixed precision), and anomaly detection framing for extreme imbalance.
Check yourself — multiple choice
- Accuracy is the right metric for highly imbalanced problems
- Use PR-AUC / F1 and techniques like SMOTE or class weights
- SMOTE undersamples the majority class
- Class weights are only for regression
Accuracy misleads on imbalanced data; use PR-focused metrics and resampling / weights.
#data-quality#imbalance
Practise MLOps & Data Quality
215 interview questions in this topic.
Related questions
- SMOTE vs class weights vs threshold tuning — which to use?
- What is data drift and how do you detect it?
- How is concept drift different from data drift?
- What are common sources of data leakage in an ML pipeline?
- How do you validate data quality in an ML pipeline?
- What is schema drift and how do you detect it?