Skip to content
ML Academy

Classical ML, validation, metrics, interpretation, debugging · insight-0185

Plot ICE curves with the PDP so averages do not hide opposite effects

Evidence type
documented fact
Difficulty
medium
Roles
Data scientist, Data analyst
Industries
aviation, retail

Summary: situation, action, reason, boundary

  1. Situation

    A partial dependence plot shows a flat or mild effect for a feature that domain experts expect to matter.

  2. Action

    Overlay individual conditional expectation curves (kind='both'), center them when many lines overlap, and colour them by a suspected moderator such as market.

  3. Reason

    A PDP averages predictions over the data, so heterogeneous or interacting effects can average out; ICE shows one curve per instance.

  4. Boundary

    Tree ensembles and other flexible models where interactions are likely.

Symptom or risk

Opposite effects in subgroups cancel in the average; the PDP suggests no effect while individual predictions move strongly.

Exceptions

For additive models without interactions, ICE curves are parallel and the PDP suffices.

Trade-offs

ICE plots get cluttered on large samples; subsample and use centered curves.

Pitfalls

Forgetting that both PDP and ICE assume independence from other features and may show impossible combinations.

Example

Synthetic airline data: true price elasticities differ by route (about -0.6 on JFK to -1.35 on AYT), so a pooled PDP averages them into one curve while ICE curves coloured by route can show the spread.

Lessons and concepts

Claims and their sources