Interpretation & error analysis

Feature importance vs SHAP, slicing errors by segment, knowing when the model is right for the wrong reason. Error analysis is the highest-ROI skill nobody practices.

About 20 min read3-question knowledge check

The mental model

Model interpretation is a post-mortem, not a eulogy. A single accuracy number is the eulogy — "the model scored 0.88, rest in peace." Interpretation is the autopsy: which cases did it get wrong, why, and is it right for the right reasons? The highest-ROI question in applied ML is not "how good is the model on average" but "where and how does it fail, and is its correctness accidental?"

Two analogies pin the two halves of the subject. **Feature importance is asking a committee who talked most** — it tells you which features the model *used*, not whether it used them correctly or in which direction. **SHAP is asking, for one specific decision, how much each member swung the vote** — it decomposes an individual prediction into per-feature contributions that sum to the output. Global importance tells you the model leans on zip_code; SHAP tells you that for *this* applicant, zip_code pushed the score down by 0.3.

The WHY that separates practitioners from course-takers: a model can be right for the wrong reason, and average metrics hide it completely. The classic is a pneumonia model that learned to read the *scanner ID* watermark because sick patients were scanned on a particular machine — 0.90 AUC offline, useless in a new hospital. Error analysis is the discipline that catches this: you slice the errors by segment (region, device, customer tier, time), look at the actual misclassified examples, and ask whether the model's mistakes are random noise (fine) or concentrated in a segment (a fixable, often serious, problem). Nobody practices it because it is manual and unglamorous, which is exactly why it is the highest-ROI skill you can bring to an interview or a team.

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