liveBook · Manning

Individual conditional expectation plot

As explained in Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

An individual conditional expectation plot shows the predicted response for an individual observation as a feature varies.

An individual conditional expectation (ICE) plot shows how predicted responses change for individual observations as one feature varies. The curves are the individual components behind a partial dependence plot (PDP) average. section 6.1.4

Use ICE plots before transforming a numerical feature. When sampled curves cluster around the PDP, the average relationship is representative; dispersed or differently shaped curves indicate that collinearity or interactions mediate the feature’s effect. section 6.1.4

Checking a feature relationship

Fit the model pipeline, then call PartialDependenceDisplay.from_estimator with kind='both' and subsample=30. Compare the sampled individual curves with the lighter dashed PDP average. section 6.1.4

How Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI covers it

How deep it goes
Explains curve interpretation and provides plotting code, stopping short of mathematical derivation.
Examples
Uses Airbnb-style numerical features, thirty sampled curves, and boxplots for encoded categorical levels.
What it assumes
Assumes a fitted machine-learning model and familiarity with partial dependence plots.
What you can do after
Diagnose whether feature effects are consistent across observations before applying transformations.
How it connects
Connects individual conditional expectation plots with partial dependence plots, collinearity, feature interactions, and one-hot encoding.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI. The section links point to the parts of the book it draws on.