Calibrating Trip Cancellation Probabilities After Negative Downsampling

Last updated: November 29, 2026

Quick Overview

Your cancellation model was trained with 5% of non-cancelled trips kept, and its scores now feed an expected-value formula for dispatch. How do you correct and verify calibration, and when would you use Platt scaling or isotonic regression instead?

Uber
Machine Learning
Machine Learning Engineer
Uber
November 29, 2026
Machine Learning Engineer
Onsite
Machine Learning
Hard

0

0

0 solved


Your cancellation model was trained with 5% of non-cancelled trips kept, and its scores now feed an expected-value formula for dispatch. How do you correct and verify calibration, and when would you use Platt scaling or isotonic regression instead?

Dispatch and pricing at Uber multiply probabilities by dollar values, so calibration errors become real money. The interviewer checks the closed-form correction for sampling, reliability diagnostics, and post-hoc calibration choices.

What the Interviewer Expects
  • Derive the odds correction for negative downsampling
  • Measure calibration with reliability curves and expected calibration error
  • Choose Platt scaling or isotonic regression with reasons
  • Fit the calibrator on held-out data from the true distribution
  • Check calibration by segment, not only overall
Key Topics to Cover
calibration
downsampling correction
Platt scaling
isotonic regression
expected calibration error
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • Why does isotonic regression need more data than Platt scaling?
  • What if calibration differs by city?
  • Does calibration change ranking metrics like AUC?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

Base cancellation rate is around 6%. Training kept all cancellations and 5% of completions, so the model saw roughly 56% positives. Scores feed $E[\text{value}] = (1 - p)\cdot \text{fare margin} - p ...

Approach

Step 1: sampling correction. Keeping negatives with probability ww multiplies the odds by 1/w1/w:

q1−q=1wp1−p  ⇒  p=wqwq+1−q\dfrac{q}{1-q} = \dfrac{1}{w}\dfrac{p}{1-p} \;\Rightarrow\; p = \dfrac{wq}{wq + 1 - q}

With $w...


Submit Your Answer
Markdown supported