Partial Dependence Plots

Description

Partial Dependence Plots show how changing one or two features affects a model's predictions on average. The technique works by varying the selected feature(s) across their full range whilst keeping all other features fixed at their original values, then averaging the predictions. This creates a clear visualisation of whether increasing or decreasing a feature tends to increase or decrease predictions, and reveals patterns like linear trends, plateaus, or threshold effects that help explain model behaviour.

Example Use Cases

Explainability

Analysing how house prices change with property size in a real estate prediction model, revealing whether the relationship is linear or if there are diminishing returns for very large properties.

Examining how customer age affects predicted loan default probability in a credit scoring model, showing whether risk increases steadily with age or has specific age ranges with higher risk.

Visualising how temperature affects crop yield predictions in agricultural models, identifying optimal temperature ranges and potential threshold effects.

Limitations

  • Assumes features are independent when averaging, which can be misleading when features are highly correlated.
  • Shows only average effects across all instances, potentially hiding important variations in how different subgroups respond to feature changes.
  • Cannot reveal instance-specific effects or interactions between the plotted feature and other features.
  • May be computationally expensive for large datasets since it requires making predictions across the full range of feature values.

Resources

DanielKerrigan/PDPilot
Software Package
Peeking Inside the Black Box: Visualizing Statistical Learning with Plots of Individual Conditional Expectation
Research PaperAlex Goldstein et al.Sep 25, 2013
SauceCat/PDPbox
Software Package
iPDP: On Partial Dependence Plots in Dynamic Modeling Scenarios
Research PaperMaximilian Muschalik et al.Jun 13, 2023
How to Interpret Models: PDP and ICE | Towards Data Science
Tutorial

Tags

Applicable Models:
Data Requirements:
Data Type:
Evidence Type:
Expertise Needed:
Explanatory Scope:
Lifecycle Stage:
Technique Type: