Prepare model and data
Use a trained predictor and a representative tabular dataset, check feature distributions and avoid evaluating ICE where features are highly correlated or out-of-distribution.
Plot individual conditional effects. Inspect feature-wise effects.
Individual conditional expectation (ICE) plots show how a model's prediction for a single instance changes when one feature varies and others are held fixed. ICE is useful to reveal heterogeneous feature effects that are hidden by aggregated plots such as partial dependence. Important failure cases include correlated features, extrapolation outside the training distribution, and noisy model behaviour for low-support regions.
Learning concept · Not a validated service
Individual conditional expectation (ICE) plots show how a model's prediction for a single instance changes when one feature varies and others are held fixed. ICE is useful to reveal heterogeneous feature effects that are hidden by aggregated plots such as partial dependence. Important failure cases include correlated features, extrapolation outside the training distribution, and noisy model behaviour for low-support regions.
A proposed application is a model-debugging dashboard for data scientists and auditors: allow selection of an instance, vary a feature with a slider, and inspect predicted changes to identify non-intuitive or unstable behaviour. A human reviewer should interpret outputs; this extension is not implemented in the supplied starter.
Use a trained predictor and a representative tabular dataset, check feature distributions and avoid evaluating ICE where features are highly correlated or out-of-distribution.
For a chosen instance, vary one feature across a grid while keeping other features fixed and record model predictions to build the ICE curve.
Overlay ICE curves for many instances to detect heterogeneous effects and compare to partial dependence to spot averaging artefacts.
Build an interactive plot (Plotly/Dash) with instance selection and feature sliders so users can explore per-instance prediction changes.
The supplied starter generates a synthetic classification dataset, trains a RandomForestClassifier, computes permutation feature importances on the test set, and prints the model score and a sorted importance table. It does not compute or plot individual conditional expectation (ICE) curves, nor does it include any interactive visualisation.
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=42, stratify=y)
model = RandomForestClassifier(n_estimators=250, random_state=42)
model.fit(X_train, y_train)
importance = permutation_importance(model, X_test, y_test, n_repeats=10, random_state=42)
report = pd.DataFrame({"feature": columns, "importance": importance.importances_mean})The starter uses make_classification synthetic data and stops at permutation importance; it does not create ICE or partial dependence values, nor any plotting or interactive components. Synthetic data and a single train/test split are insufficient to evaluate explanation stability on real domains.
A proposed extension is an interactive ICE visualiser: let users pick an instance, choose a feature, and see the ICE curve alongside a distribution rug and aggregated partial dependence, with options to group by subpopulations.
This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.
Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.