Calibrate a Late Delivery Classifier Before Using Its Scores

Last updated: November 29, 2026

Quick Overview

A model predicts the probability that a package will arrive late, and operations wants to trigger proactive customer messages when the probability exceeds 30%. How do you check whether the scores are calibrated, and how would you fix them if not?

Amazon
Machine Learning
Machine Learning Engineer
Amazon
November 29, 2026
Machine Learning Engineer
Technical Screen
Machine Learning
Medium

0

0

0 solved


A model predicts the probability that a package will arrive late, and operations wants to trigger proactive customer messages when the probability exceeds 30%. How do you check whether the scores are calibrated, and how would you fix them if not?

Amazon logistics teams use predicted probabilities directly in business rules, such as when to notify customers or reroute packages. The interviewer checks that you understand ranking quality (AUC) is different from calibration and can apply standard calibration methods correctly.

What the Interviewer Expects
  • Distinguish discrimination (AUC) from calibration
  • Use reliability diagrams and expected calibration error
  • Apply Platt scaling or isotonic regression on held-out data
  • Check calibration per segment and over time
  • Tie the threshold to business costs
Key Topics to Cover
Probability calibration
Reliability diagram
Expected calibration error
Isotonic regression
Decision thresholds
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 might a gradient boosted model or a class-weighted model be miscalibrated?
  • When would you prefer isotonic over Platt scaling?
  • How does calibration change during peak season?
  • How would you choose the 30% threshold in the first place?
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
  • What does the 30% threshold mean to operations? They likely assume "of packages scored 0.3, about 30% are late". That is a calibration assumption, not a ranking one.
  • How was the model trained? Cla...
Approach
  1. On a held-out set, bin predictions (for example 10 equal-frequency bins) and compare average predicted probability with observed late rate in each bin: the reliability diagram.
  2. Summarize wit...

Submit Your Answer
Markdown supported