Calibrating a Rare Refund Abuse Model After Negative Downsampling
Last updated: November 29, 2026
Quick Overview
DoorDash trains a model to flag refund abuse, which affects 0.5% of refund requests. The team kept only 2% of negatives during training, and now the model's scores look far too high in production. Explain why and fix the calibration.
DoorDash
November 29, 20260
0
0 solved
DoorDash trains a model to flag refund abuse, which affects 0.5% of refund requests. The team kept only 2% of negatives during training, and now the model's scores look far too high in production. Explain why and fix the calibration.
Fraud and abuse models at DoorDash feed into automated refund decisions, so probability scores must mean what they say. The interviewer checks understanding of class imbalance, the math of downsampling correction, and how calibration interacts with cost-based thresholds.
What the Interviewer Expects
- Explain how negative downsampling shifts predicted probabilities
- Derive the prior correction formula
- Measure calibration with reliability curves or ECE
- Choose metrics suited to rare events such as precision-recall
- Set a decision threshold using costs of false positives and false negatives
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- Why not just train on the full imbalanced data?
- When would you use Platt scaling or isotonic regression instead of the formula?
- How does calibration drift over time, and how would you monitor it?
- How would you pick a threshold if a false positive angers a loyal customer?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Positives 0.5%. Training kept all positives and 2% of negatives, so the training set has about 20% positives. Scores are used to auto-deny or route refunds to manual review....
Approach
A model trained on the downsampled set learns odds that are inflated by the inverse keep rate . Correct the odds back: . Then verify calibration...