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

SHAP Force Plots for Individual Predictions

Learn to interpret force plots showing how features push predictions away from the base value for single instances.

SHAP Force Plots for Individual Predictions

What you'll learn: How to use SHAP force plots to visualize exactly which features pushed a single prediction higher or lower from the baseline.

The Core Idea

After computing SHAP values for a prediction, you need to see the story they tell. A force plot is a visual representation that shows how each feature's SHAP value "pushes" the prediction away from the base value (the average model output across your dataset).

Think of it like forces acting on a scale: the base value is your starting point, and each feature either pushes the prediction upward (positive SHAP value, shown in red) or pulls it downward (negative SHAP value, shown in blue). The final prediction is where all these forces settle.

How Force Plots Work

The plot displays:

  • Base value (left): The average prediction your model makes
  • Feature contributions (middle): Arrows or blocks showing each feature's push/pull effect
  • Final prediction (right): Where you land after all contributions

Features that increase the prediction appear as red blocks pushing rightward. Features that decrease it appear as blue blocks pushing leftward. The size of each block corresponds to the magnitude of that feature's SHAP value.

Why This Matters for Interpretability

Force plots answer: "Why did the model predict this for this specific instance?" Unlike global feature importance (which averages across all predictions), force plots give you instance-level insight. You can explain to stakeholders exactly why a loan was denied, why a patient received a high-risk score, or why a product was recommended.

Key Takeaway: SHAP force plots visualize individual predictions as a tug-of-war between features, showing which push the prediction above or below the baseline and by how much, enabling transparent instance-level explanations.