Paths Subjects Questions Quizzes Pricing Search
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.
  1. 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?
  2. Is Engineer Y's evaluation methodology sound? Why or why not?
  3. 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

← Back to Logistic Regression & Linear Classifiers practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.