Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Limitation of ICE when required for 1D and 2D interactions #19305

@glemaitre

Description

@glemaitre

The following code requested to display ICE will fail:

features = ["EDUCATION", "AGE", ("EDUCATION", "AGE")]
fig, ax = plt.subplots(figsize=(15, 5))
_ = plot_partial_dependence(
    model.named_steps['histgradientboostingregressor'],
    X_train_preprocessed, features, feature_names=feature_names,
    n_jobs=-1, grid_resolution=20, ax=ax, kind="both",
)

It is due to the fact that we are requesting a 2D interaction (EDUCATION, AGE) for which we cannot return ICE.
I think that we should support this use-case by only returning the PDP plot, potentially with a warning.
It is a better user experience than having to call the function twice.

@NicolasHug @thomasjpfan Do you think it would be a sensible thing to do?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions