Advanced
Open
Pro
Class Weighting, Resampling and What It Does to Calibration
A fraud team trains logistic regression on 2 million transactions with a 0.3% fraud rate. Two engineers try different fixes:
- Engineer X undersamples non-fraud transactions to get a 50/50 training set, trains, and reports the raw model output as "the probability this transaction is fraud."
- Engineer Y keeps the original 0.3% rate but sets
class_weight="balanced"and evaluates using PR-AUC on an untouched, naturally-imbalanced validation set.
- What is wrong with Engineer X's probability claim, and how would you fix the model's outputs so they are usable as real probabilities?
- Is Engineer Y's evaluation methodology sound? Why or why not?
- Both engineers want to also report calibration. Describe the specific check you'd run and what a bad result would look like for this fraud model.
Share this question