A partial dependence plot (PDP) shows how a trained model’s average prediction changes as one or more input features vary, while marginalizing over other features. It helps reveal modeled linearities, nonlinearities, and possible interactions before transforming numerical data. section 6.1.4
Use PDPs with these practical cautions:
- Interpret the plotted feature as having a direct effect only when it is independent of other inputs; correlated features make the result an average that also reflects their effects. section 6.1.4
- Compare average PDPs with ICE plots when individual prediction paths matter, and inspect two-feature PDPs when interactions are suspected. section 6.1.4
Airbnb NYC model inspection
Fit an XGBoost model in a preprocessing pipeline, then call scikit-learn’s PartialDependenceDisplay with kind='average' for features such as minimum_nights, number_of_reviews, calculated_host_listings_count, and availability_365. Plot a classification threshold to help interpret predicted outcomes.

