Skip to content

ENH Add custom_range argument for partial dependence - version 2#26202

Merged
adrinjalali merged 87 commits into
scikit-learn:mainfrom
stephenpardy:20890-partial-dependence-custom-grid
Nov 19, 2024
Merged

ENH Add custom_range argument for partial dependence - version 2#26202
adrinjalali merged 87 commits into
scikit-learn:mainfrom
stephenpardy:20890-partial-dependence-custom-grid

Conversation

@stephenpardy
Copy link
Copy Markdown
Contributor

@stephenpardy stephenpardy commented Apr 17, 2023

Reference Issues/PRs

Fixes #20890 and is a followup to the stale PR - #21033

Also fixes #30271

What does this implement/fix? Explain your changes.

This PR allows users to specify a custom_range of values to calculate partial depedency for some or all of the features.

The api is custom_range={feature: array-like of grid values}.

Any other comments?

@glemaitre
Copy link
Copy Markdown
Member

We will not make it for 1.6. I moving the milestone to 1.7

@glemaitre glemaitre modified the milestones: 1.6, 1.7 Nov 6, 2024
Copy link
Copy Markdown
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are also failing.

Comment thread doc/whats_new/upcoming_changes/sklearn.inspection/26202.enhancement.rst Outdated
Comment thread examples/inspection/plot_partial_dependence.py Outdated
Comment thread examples/inspection/plot_partial_dependence.py Outdated
Comment thread examples/inspection/plot_partial_dependence.py
Comment thread sklearn/inspection/_partial_dependence.py Outdated
stephenpardy and others added 6 commits November 7, 2024 08:13
…ement.rst

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
@stephenpardy
Copy link
Copy Markdown
Contributor Author

Tests are also failing.

Thanks for the suggestions, I haven't had much time to look at this recently. I will also update the version number to specify 1.7.

@stephenpardy
Copy link
Copy Markdown
Contributor Author

@adrinjalali I think I have addressed all your comments. I have fixed a separate issue here, but can split that out if desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

partial_dependence errors when given only two grid points Allow users to pass their own grid to partial dependence

7 participants