What is Individual Conditional Expectation (ICE)?
Individual Conditional Expectation (ICE) is a model-inspection method that varies one selected feature over a grid for each reference instance while holding that instance's remaining features fixed, producing one prediction-response curve per instance.
Quick Facts
| Specification | Official Specification |
|---|
How It Works
Generate one response curve per instance
Select a fitted model, scalar output, feature, grid, and reference rows. For every row, hold all complementary features fixed, replace the target feature with each grid value, and evaluate the model. The original ICE paper introduced these per-observation curves to reveal fitted relationships that a Partial Dependence Plot can obscure through averaging.
Center, differentiate, and stratify carefully
Raw ICE curves retain different prediction intercepts. Centered ICE subtracts each curve's value at a declared anchor so response shapes are easier to compare; derivative ICE emphasizes where slopes differ. Color or stratify curves by a plausible interaction feature, sample rows deterministically when the plot is crowded, and keep the PDP overlay to show the corresponding population average.
Separate heterogeneity from unsupported perturbations
A fan of curves can indicate model interactions, but it can also arise where grid replacements violate the joint feature distribution or where the model extrapolates. Show feature density, flag unsupported row-grid combinations, repeat the analysis on meaningful cohorts, and test model versions. ICE describes conditional model behavior for fixed row profiles, not individualized treatment effects or causal responses.
Key Characteristics
- Produces one feature-response curve for every selected reference instance
- Keeps each instance's complementary feature values fixed across the grid
- Reveals heterogeneous slopes or shapes hidden by a PDP average
- Supports centered curves for shape comparison and derivative curves for local change
- Depends on row sampling, grid, anchor, target output, and model version
- Can generate unsupported combinations and does not estimate individual causal effects
Common Use Cases
- Finding subgroups whose model response differs from the population average
- Checking whether an apparently flat PDP hides opposing response directions
- Locating feature ranges where model interactions or thresholds emerge
- Comparing response heterogeneity before and after a model update
- Selecting representative profiles for deeper counterfactual or error analysis
Example
Loading code...Frequently Asked Questions
What does one line in an ICE plot represent?
One line represents one reference instance. The selected feature is moved across a common grid while that instance's other features stay fixed, and the model output is recorded at each point. It is a response path for the fitted model under synthetic replacements, not a longitudinal record of what happened to that person or object.
How is ICE related to a Partial Dependence Plot?
For the same model, target, rows, weights, and grid, the PDP is the pointwise average of the ICE curves. PDP compresses behavior into one global curve; ICE preserves instance-level variation. A flat PDP can therefore coexist with steep positive and negative ICE curves whose effects cancel in the average.
When should centered ICE be used?
Use centered ICE when different baseline predictions make curve shapes hard to compare. Subtract each curve's prediction at a declared anchor, such as a supported lower quantile or the observed value. The result emphasizes relative change, but the anchor is part of the explanation contract and should not be chosen after seeing a preferred pattern.
Can ICE curves identify feature interactions?
Diverging slopes or shapes are evidence that the fitted response to the selected feature varies with other inputs, which suggests an interaction. ICE alone does not identify which variable causes that variation. Color or partition curves using preselected candidate features, then confirm the pattern with held-out data and explicit interaction tests.
Do ICE plots provide individual causal effects?
No. Holding observed covariates fixed and changing one model input is a ceteris-paribus query to the prediction function. The synthetic row may be infeasible, and the model may encode confounding or proxies. Individual causal effects require potential-outcome or structural assumptions, treatment support, and an identified estimation design.