KatInterview

Bias-Variance, Calibration, and Drift: A Production ML Walkthrough

Machine LearningModel answer
MediumModel answerMachine Learningbias-variancecalibrationmodel-drift

Last updated

Explain the bias-variance decomposition, what a calibrated probability means and how to repair one, and how concept drift differs from covariate shift in production.

Three Core Concepts for a High-Stakes ML Role

You're interviewing for a machine learning engineering role on a team that ships predictive models into settings where wrong probabilities have real costs. The interviewer wants you to explain three ideas and connect them to what happens after a model goes live.

  1. Bias and variance. Describe what underfitting and overfitting look like, and how changing model complexity moves the bias and variance parts of expected test error.

  2. Calibration. Say a classifier assigns 0.8 to an example. What does it mean for that score to be well calibrated? Why can a model have excellent ranking quality (for example, a high AUC-ROC) and still be poorly calibrated? How would you correct the calibration?

  3. Drift. Distinguish concept drift from data drift (covariate shift). Give a concrete example of each and describe how you would detect them in a live system.

Tie the theory back to operations. In particular, explain what signals should trigger a retrain, and what should not.

Hints

Hint 1

Write expected squared error at a fixed input as bias squared plus variance plus irreducible noise, and ask which term each kind of model complexity moves.

Hint 2

Separate ranking quality from probability quality: think about what happens to AUC when every score is passed through a strictly increasing function.

Hint 3

Ask which factor of the joint distribution P(X, Y) changes under each kind of drift, and whether you can detect that change without seeing labels.