Partial Dependence Plots

ICE gives one line per instance. Average those lines and you get a partial dependence plot, or PDP.

The summary answers: on average, how does the model prediction change as this feature changes?

Average marginal effect

For feature set SS:

f^S(xS)=1ni=1nf^(xS,xi,C)\hat f_S(x_S)=\frac{1}{n}\sum_{i=1}^{n}\hat f(x_S,x_{i,C})

The selected feature values xSx_S vary. The remaining values xi,Cx_{i,C} come from each observed instance, and predictions are averaged.

Blend ICE Curves into a PDP

Toggle the individual bicycle-demand curves behind the global average. The bold PDP is literally their pointwise mean.

PDP bicycle demand

66 rentals

bold = PDP averagetemperature
The PDP is clean because it discards variation. Turn the ICE curves back on whenever the average looks suspiciously simple.

PDPs are clear and easy to implement. They also assume the varied feature can be combined freely with the remaining features — and that assumption breaks when features are correlated.

PDP Correlation Bias — Engine Size vs. Horsepower

The model predicts car price from engine size and horsepower. Because these features are strongly correlated, the PDP method creates unrealistic combinations when sweeping engine size.

Engine size grid value3.0L
1.01.52.02.53.03.54.04.55.0

Selected: 3.0L engine

PDP avg price

$56.6k

Realistic avg

$57.0k

Unrealistic cars

13 of 20

Bias (PDP − real)

-0.4k

Training data — engine size vs. horsepower

Engine size (L)Horsepower12345

Predicted price vs. engine size

$20k$40k$60k$80k$100kEngine size (L)Price12345PDP (all instances)
Highlighting the unrealistic instances for a 5.0L engine shows why the PDP average can be misleading: it includes predictions for cars that don't exist in practice.

Engine size and horsepower make the failure concrete: when the PDP sweeps engine size to 5.0L it averages over every car in the dataset — including compact cars with 100 hp that simply don't exist at that displacement. Inspect ICE curves and feature correlations before trusting the average line.

Checkpoint

What information does a PDP lose when ICE curves cross?