Course contentsShow
← Machine Learning and Deep Learning
Lesson 3213 of 3,53870. Interpretability: Feature-Based MethodsFree lesson

SHAP Summary Plots and Feature Importance

Master SHAP summary plots to visualize global feature importance and value distributions across predictions.

SHAP Summary Plots and Feature Importance

What You'll Learn

You'll learn how to use SHAP summary plots to visualize which features matter most globally across all predictions and how feature values influence model outputs.

The Core Idea

While individual SHAP values explain single predictions, summary plots aggregate SHAP values across your entire dataset to reveal global patterns. Think of it like switching from reading individual customer reviews to seeing a summary dashboard that shows which product features customers care about most overall.

A SHAP summary plot displays:

  • Feature importance (y-axis): Features ranked by their average absolute SHAP value impact
  • Distribution of impacts (x-axis): How SHAP values spread across all samples
  • Feature values (color): Whether high (red) or low (blue) feature values push predictions up or down

How It Works

For each feature, the plot shows a horizontal strip of dots. Each dot represents one prediction from your dataset. The dot's position shows whether that feature pushed the prediction higher (right) or lower (left) for that sample, while its color reveals whether the actual feature value was high or low.

This lets you answer questions like: "Does high age always increase predicted risk?" If you see red dots (high age) clustered on the right side, the answer is yes.

Reading the Plot

  • Top features: Highest visual spread = most important globally
  • Horizontal patterns: Consistent direction means monotonic relationship
  • Vertical scatter: Wide spread means the feature's impact varies greatly
  • Color segregation: Red on right, blue on left = positive correlation with output

Key Takeaway: SHAP summary plots transform thousands of individual SHAP values into a single visualization that reveals both global feature importance rankings and how feature values directionally influence predictions across your entire dataset.