Lesson 1 of 6

Global vs Local Explanations

Welcome to Model Interpretability. A model that only spits out numbers is hard to trust and impossible to act on. This course teaches you to open the box and explain what a model is doing, in plain terms a colleague or a customer can follow.

Here is the situation we will use all the way through. A telecom has trained a model that scores each customer on how likely they are to leave (to "churn"). This morning it flagged Ravi, a customer who is 3 months in, pays $105 a month, and has called support 4 times. His score: 0.96, very likely to leave.

Two colleagues walk over with two very different questions:

  • The product lead asks: "In general, what makes our customers leave?"
  • Ravi's account manager asks: "Why did the model flag Ravi in particular?"

Those are not the same question, and they do not have the same answer. One is global (about the whole model), the other is local (about one prediction). Telling them apart, and answering each correctly, is the foundation everything else in this course builds on.

By the end you will be able to:

  • Tell a global question (about the whole model) from a local one (about one prediction)
  • Read a global feature-importance ranking, and say what it does and does not tell you
  • Split a single prediction into per-feature pushes that add back to exactly that prediction
  • Explain how the same feature can matter one way overall yet push the opposite way for one person

Prerequisites: you can fit and use a predictive model in R and read its output, and you know what a feature and a prediction are (any earlier Data Scientist lesson, for example The Bias-Variance Tradeoff).

The picture below is a preview of a local explanation: one customer's score, taken apart feature by feature. We will build up to reading it.

The one distinction that organizes everything

Two questions about one model

Every question you can ask a trained model falls into one of two buckets.

A global explanation describes the model as a whole, summarized over all the data it was trained on. "Which features does this churn model lean on the most?" is global. The answer is one story about the model, and it does not change from customer to customer.

A local explanation is about a single prediction. "Why did the model score Ravi at 0.96?" is local. The answer is specific to Ravi and his particular feature values, and it can look completely different for the next customer.

Here they are side by side, on our churn model:

Global explanation Local explanation
The question What has the model learned overall? Why did it make THIS one prediction?
Scope The whole model, across all 500 customers One customer, one prediction
Example Which features drive churn in general? Why was Ravi scored 0.96?
Who asks A data scientist auditing the model, a product lead The customer, a support agent, a regulator
Key Insight
Global answers "what did the model learn?" Local answers "why this prediction?" Reaching for the wrong one is the single most common interpretability mistake, and by the end of this lesson you will never confuse them again.