Problem framing & baselines

Classification vs regression vs ranking, label definition, and always shipping a dumb baseline first. Most interview failures start with framing, not math.

About 24 min read3-question knowledge check

The mental model

An ML model is a new employee whose only power is to change one decision. Problem framing is writing that employee's job description before you hire. The analogy that sticks: a courtroom. The business goal is justice; the prediction target is the verdict; the label is how past verdicts were recorded; the decision is the sentence. If you write the wrong charge sheet — predict "will the customer click" when the business needs "will the customer pay" — you can win every accuracy argument and still lose the case.

Why framing exists at all: without it, teams optimize a proxy that silently diverges from the goal. The model predicts churn perfectly, but the retention team cannot act on a score delivered the day the user leaves. The model ranks loan applicants by repayment probability, but the business constraint is regulatory approval rate. Most ML project failures are framing failures dressed up as modeling failures — the math was fine, the question was wrong.

The second half of the mental model is the baseline as a null hypothesis. Before any learned model, you ship the dumbest defensible predictor: predict the majority class, predict yesterday's value, predict the per-segment average. The baseline is not a formality — it is the number every later model must beat by enough to pay for its own complexity. A gradient-boosted model that beats "predict last month's spend" by 0.4% of MAE is not a win; it is an expensive way to reimplement a heuristic.

The full lesson continues with 15 more sections
  • Deep dive
  • Internal architecture
  • Real-world use cases
  • Best practices
  • Common mistakes
  • Performance
  • Security
  • Production troubleshooting
  • Advantages & disadvantages
  • Alternatives
  • Interview expectations
  • Interview questions
  • Facts to remember
  • Cheat sheet
  • Quick revision