How do you correct predicted probabilities back to the true class prior after undersampling?
Last updated
Keeping a fraction β of negatives inflates the model's odds by 1/β. Correct with p = β·p_s / (β·p_s − p_s + 1), i.e. logit(p) = logit(p_s) + ln β (an intercept shift).
In general, reweight each class probability by π_true / π_train and renormalize. This also works for multiclass.
This is valid only for random undersampling of a calibrated model. NearMiss, ENN, or SMOTE change p(x|y), so recalibrate on real-distribution data. AUC is unchanged.