EasyDeepLearn
Supervised Learning · section 18 of 18

Interview scenarios

3 interview questions on interview scenarios, each answered in full. Free to read, no account needed.

Name three situations where you should NOT reach for machine learning.

medium
  • (1) A hand-crafted rule solves it deterministically — 'if age < 18, deny' beats a model both in accuracy and interpretability.
  • (2) No representative labeled data (or feasible way to get any) — you'll just fit noise.
  • (3) The prediction has to be perfectly explainable / auditable and even a linear model is too opaque (e.g., certain regulatory decisions).
  • Also: when the cost of a wrong prediction is catastrophic and the marginal accuracy gain is tiny — deterministic rules or human-in-the-loop win.
#interview-scenariosPermalink & quiz →

What are the limits of SHAP values when explaining a model to a stakeholder?

hard
  • SHAP explains the model, not the world: it attributes the model's output, so a spurious feature gets a large attribution if the model relies on it.
  • With correlated features, the credit split between them is arbitrary, and swapping two collinear features can move attributions dramatically without changing predictions.
  • TreeSHAP is exact for trees but KernelSHAP is an approximation whose variance depends on the sample size.
  • And a local attribution is not a causal claim: 'income contributed +0.3' does not mean raising income would change the outcome.
  • State that explicitly when a stakeholder wants to act on it.
#interpretability#interview-scenariosPermalink & quiz →

How do you justify shipping logistic regression over a boosted ensemble that scores better?

medium
  • Frame it as total cost, not offline metric.
  • If the gap is a fraction of a point of AUC and the decision threshold sits in a region where both models rank the same customers, the business outcome is identical.
  • Logistic regression gives you coefficients a regulator can read, near-zero inference latency, trivial monitoring, and calibrated probabilities out of the box.
  • It also fails predictably under drift instead of in surprising ways.
  • Quantify the gap in the metric the business actually uses, and if it is negligible, the simpler model is the better engineering decision.
#interview-scenarios#interpretabilityPermalink & quiz →

Practise Supervised Learning