Your positive class is 0.5%. Is resampling your first move?
mediumAnswer
- Usually not.
- First check whether you have an evaluation problem rather than a training problem: switch from accuracy to precision-recall AUC or precision at the operating point, since accuracy is meaningless at that base rate.
- Then try class weights, which are cheaper than resampling and leave the data distribution alone.
- Boosting with often handles 1:200 without any resampling.
- Reach for SMOTE last, and only inside the cross-validation folds, because oversampling before splitting leaks synthetic neighbours across the split.
- Remember resampling distorts predicted probabilities and needs recalibration afterwards.
Check yourself โ multiple choice
- Always start with SMOTE
- Fix the metric first, then try class weights; resample last, inside the folds, and recalibrate afterwards
- Drop the minority class
- Imbalance never matters
Metric choice and class weights come before resampling, which distorts probabilities.
#imbalance#metrics-classification
Practise Supervised Learning
215 interview questions in this topic.
Related questions
- When should you use PR-AUC instead of ROC-AUC?
- How do you handle class imbalance in a dataset?
- Why is the base rate of the positive class critical to know?
- How do class weights work in logistic regression, and when do you use them?
- You trained Naive Bayes on balanced data but deploy on data where positives are 1%. What happens and what do you do?
- How do you handle class imbalance in XGBoost / LightGBM?