SMOTE vs class weights vs threshold tuning — which to use?
mediumAnswer
- (1) Class weights: cheapest, no data manipulation.
- Try first — often sufficient for 10-100:1 imbalance.
- (2) Threshold tuning: adjust decision threshold on ROC curve to trade precision/recall — free (post-training).
- (3) SMOTE: interpolates synthetic minority points in feature space.
- Works when features are continuous + interpolation is meaningful.
- Risky in high-D + text.
- Modern variants (ADASYN, borderline SMOTE).
- (4) Undersampling majority: throws data away — combine with ensembles.
- Focal loss on deep models.
- Use threshold + weights first, SMOTE only if still insufficient.
Check yourself — multiple choice
- Random
- Try class weights + threshold tuning first (free) — SMOTE only if insufficient (risky high-D); undersample + ensemble; focal loss for deep models
- Only SMOTE
- Always undersample the majority class first
Imbalance: weights + threshold first; SMOTE last; focal loss for DL.
#imbalance#data-quality
Practise MLOps & Data Quality
215 interview questions in this topic.
Related questions
- What does 'data imbalance' mean and why is it a problem?
- 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?