Partial dependence averages a model’s predictions after setting one feature to chosen values; ICE keeps the per-record paths visible, including disagreement hidden by the average.
Partial dependence, ICE curves and support limits
Inspect the model response
For a pump follow-up predictor, set inlet temperature to several plausible values and score each held-out pump again. The average of those scores at each value is a partial-dependence curve. An individual conditional expectation curve is the sequence for one pump. Neither is a physical experiment: the model receives edited records, and the real pump may not attain those combinations.
Look behind a flat average
One equipment type may show rising predicted risk with heat while another shows falling risk because of a learned interaction or data defect. The average can look flat. Plot or tabulate a small set of ICE paths and group summaries before describing a global effect. Group error review should accompany the response curve.
Mark unsupported feature combinations
Temperature and pressure may covary under normal operation. Replacing temperature while leaving pressure fixed can create points absent from training. Restrict the grid to observed support within equipment and operating mode, or flag the unsupported regions explicitly. This changes what the curve can say and may leave few valid records. Support overlap is the adjacent deployment check.
Keep time and units stable
Only vary a feature that would be available when the prediction runs. Use the same preprocessing, units and model version used in serving. A curve from a later sensor revision can look smooth while describing the wrong scale. Prediction-time availability remains necessary even for diagnostic plots.
Do not turn response into advice
A model score falling at a lower synthetic temperature does not prove cooling the equipment will lower failure risk. Operators need a causal or engineering assessment before acting. Counterfactual review puts action constraints on what-if scenarios.
Implementation
pump_records = [
{"asset": "pump-47", "temperature": 54, "pressure": 22},
{"asset": "pump-62", "temperature": 59, "pressure": 28},
]
temperature_grid = (48, 56, 64)
def illustrative_risk(record):
return min(1.0, max(0.0, 0.015 * record["temperature"]
+ 0.006 * record["pressure"] - 0.6))
ice = {record["asset"]: [illustrative_risk({**record, "temperature": setting})
for setting in temperature_grid]
for record in pump_records}
partial_dependence = [sum(ice[asset][index] for asset in ice) / len(ice)
for index in range(len(temperature_grid))]
assert len(ice["pump-47"]) == 3
assert all(left < right for left, right in zip(partial_dependence, partial_dependence[1:]))
assert round(partial_dependence[1], 3) == 0.39Performance and operating cost
A grid of G values over N records requires O(G times N) model predictions and O(G times N) storage if every ICE path is retained. Streaming a partial-dependence average reduces storage to O(G). The linear scorer here is intentionally simple; support checks and per-slice plots are essential with a fitted nonlinear model.
Common Mistakes
- Do not call a partial-dependence slope a causal treatment effect.
- Do not trust an average curve when individual paths disagree.
- Do not ignore feature combinations absent from the observed operating range.
