Marginalization explains how a model’s output relates to one selected feature by averaging away the influence of all remaining features. In a partial dependence plot (PDP), hold the selected feature at a chosen value, predict across the examples, and average those predictions. Repeating this for multiple values reveals the feature–target relationship. section 9.3.2
Compute a marginal effect with this practical procedure:
- Choose the feature and a candidate value a. section 9.3.2
- Replace that feature’s entire data column with a, leaving the other features unchanged. section 9.3.2
- Run the black-box model on the modified data and average the resulting prediction vector. section 9.3.2
- Repeat for other values to produce the full partial dependence relationship; approximation avoids an infeasible exact integral. section 9.3.2
Two points on a partial dependence plot
For the third feature, create modified datasets with the feature fixed at two chosen values, generate predictions for each dataset, and average each prediction set to obtain two PDP points.
