The accuracy trap
If 1% of users churn, a model that predicts "no one churns" is 99% accurate and 0% useful. Class imbalance first exposes a problem with the metric, not necessarily the model. Measure how many rare positives you recover and what false alerts cost instead of celebrating the majority class.
Read the costs from the confusion matrix
Translate false positives and false negatives into actions, money, or review time. Missing fraud and reviewing a legitimate transaction do not have equal consequences. Choose PR-AUC, F-beta, recall at a fixed precision, or expected cost from that operational asymmetry.
Three honest responses
- Change the metric — PR-AUC, F-beta, recall at fixed precision, expected cost.
- Change the threshold — leave the model as-is and pick an operating point that respects cost and team capacity.
- Change the sampling — compare class weights, majority downsampling, and SMOTE for tabular minority synthesis.
PR-AUC is often more revealing
ROC-AUC can remain high when a huge negative class makes the false-positive rate look small. Precision-recall curves expose how pure the alerts are as recall rises. Report PR-AUC beside the positive prevalence and inspect the exact operating point the team can use.
Resample only inside training folds
Do not oversample before the train/validation split. Synthetic or duplicated minority examples can leak near-copies into validation. Put resampling inside an imbalanced-learn pipeline so each cross-validation fold changes only its training portion while validation keeps the real class prevalence.
Fifty-fifty is not the objective
Start with the nearly free class_weight="balanced" baseline. Aggressive resampling can overfit and distort probability calibration. Evaluate every method on data with the production prevalence, recalibrate if necessary, and choose the one that minimizes the metric and cost you actually care about.
"교과서가 그랬다는 이유로 50/50 balance를 추구하지 마. 옳은 balance는 너가 진짜 신경 쓰는 metric을 최소화하는 그거야." 클래스 불균형 공부하면서 배운 최고의 인사이트입니다. 무조건 소수 클래스를 샘플링 업하든가 ,smote, rose...사용하든가 아무 생각없이 자동으로 설정했어요.(자격증 공부때문에).