ICE Plots

A hospital model estimates readmission risk. The team wants to know what happens to one patient's prediction as age changes while the rest of that patient's record stays fixed.

An Individual Conditional Expectation plot draws that curve. Repeating the process for many patients reveals whether the model treats them similarly.

So how does this work?

  1. Select an instance and a feature of interest.
  2. Keep all other features constant and create variants of the instance by sweeping the feature across a grid of values.
  3. Run each variant through the black-box model to get a prediction.


The result is a set of (feature value, prediction) pairs for that instance — connect them and you have one ICE curve.

One curve per instance

For instance ii and feature xjx_j, ICE evaluates:

f^(xj,xi,j)\hat f(x_j, x_{i,-j})

xjx_j moves across a grid while all other feature values xi,jx_{i,-j} remain fixed. Each line therefore belongs to one real instance.

Follow One Patient at a Time

Drag the age slider — each line is one patient's predicted readmission risk as age changes while all other features stay fixed. Patient 3 moves against the others.

Patient 10.264
Patient 20.444
Patient 3 (inverse)0.272
Patient 40.464

Average at age 44

0.361

0.000.250.500.751.0020304050607080AgeRisk
ICE preserves individual heterogeneity. Crossing lines are evidence that age interacts with other patient features.

ICE exposes heterogeneity that an average can hide. It also creates hypothetical records. Changing age from 28 to 78 while leaving every related health variable fixed may produce a patient who does not exist.

Use ICE to inspect model behavior, then check whether the evaluated combinations are supported by the data.

Checkpoint

What does it mean if half the ICE curves rise with age and half fall?