How did you handle class imbalance in classification tasks?medium

Type
scenario
Topic
did-you-handle-class-imbalance-in-classification-tasks
Frequency
common
Tags
machine-learning, how, did, you, handle, class
Answer

Options: oversampling minority class (SMOTE), undersampling majority, class_weight='balanced' in sklearn, adjusting decision threshold post-training, or using F1/AUC-ROC instead of accuracy.

Explanation

Options: oversampling minority class (SMOTE), undersampling majority, class_weight='balanced' in sklearn, adjusting decision threshold post-training, or using F1/AUC-ROC instead of accuracy. In resume screening, threshold tuning + weighted scoring worked better than resampling since the minority examples were genuine top candidates, not noise.

Follow-upWhat tradeoffs did you consider in that implementation?