Individual Conditional Expectation Plots
Description
Individual Conditional Expectation (ICE) plots display the predicted output for individual instances as a function of a feature, with all other features held fixed for each instance. Each line on an ICE plot represents one instance's prediction trajectory as the feature of interest changes, revealing whether different instances are affected differently by that feature. This complements Partial Dependence Plots by showing heterogeneous effects across individual instances rather than just the average trend.
Example Use Cases
Explainability
A valuation team checks a house-price model before using it for automated estimates. ICE lines for property age show most homes losing value as they age, but a group of pre-1900 homes gaining value. The team asks whether the model has learned a real heritage premium or is reacting to a handful of unusual sales.
A hospital data science team reviews a diabetes risk model before clinicians use it. ICE lines of predicted risk against BMI rise steadily for most patients but stay flat for a small group. The team colours the lines by recorded characteristics, such as age band, to see what the flat group shares, then asks a clinician whether a flat response is plausible.
A credit risk validation team marks each applicant's actual income on that applicant's ICE line for a loan pricing model. For some applicant profiles the line changes steeply at incomes where no similar applicants appear in the training data. The team treats that part of the line as extrapolation and restricts the model's use to the supported range.
Limitations
- With hundreds or thousands of cases the lines overlap into a dense band that hides individual behaviour. Plotting a sample of lines, shifting them to start at the same point, or colouring them by a second feature is usually needed before the plot can be read.
- Each line changes one feature while holding the case's other features fixed. Where features are correlated, parts of a line describe combinations that never occur in the data, so the model is extrapolating there. Marking each case's actual feature value on its line shows which part of the line the data supports.
- Lines that are not parallel show that the feature's effect depends on other features, but not which ones. Finding out means colouring the lines by candidate features one at a time, so the search is by trial and error.
- Judging whether lines differ by more than chance is done by eye, and a model can produce uneven lines from noise alone. The authors' formal check hides the real plot among plots made from additive fits, which needs the model to be refitted many times.
- In its basic form the plot needs a model prediction for every case at every observed value of the feature, so the number of predictions grows with the square of the dataset size. Large datasets or slow models call for sampling.
Resources
Research Papers
Peeking Inside the Black Box: Visualizing Statistical Learning with Plots of Individual Conditional Expectation
This article presents Individual Conditional Expectation (ICE) plots, a tool for visualizing the model estimated by any supervised learning algorithm. Classical partial dependence plots (PDPs) help visualize the average partial relationship between the predicted response and one or more features. In the presence of substantial interaction effects, the partial response relationship can be heterogeneous. Thus, an average curve, such as the PDP, can obfuscate the complexity of the modeled relationship. Accordingly, ICE plots refine the partial dependence plot by graphing the functional relationship between the predicted response and the feature for individual observations. Specifically, ICE plots highlight the variation in the fitted values across the range of a covariate, suggesting where and to what extent heterogeneities might exist. In addition to providing a plotting suite for exploratory analysis, we include a visual test for additive structure in the data generating model. Through simulated examples and real data sets, we demonstrate how ICE plots can shed light on estimated models in ways PDPs cannot. Procedures outlined are available in the R package ICEbox.