-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] Partial dependence plots -- continued #12599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the change to the CI to trigger the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give me a sense of what else has changed? It's hard to get from comparing commits since files have moved etc.
Apart from moving files to |
I'm happy to merge after those three comments are addressed. |
Thanks and congrats, @NicolasHug and @trevorstephens!! |
Thanks a lot for the reviews @glemaitre @jnothman |
Wow, congrats @NicolasHug on getting this done, bravo!! |
Yay!! |
This reverts commit e6c7e94.
This reverts commit e6c7e94.
Which breaks my package sklearn-gbmi (which computes Friedman-Popescu H statistics to identify interactions between features in gradient boosted regression trees). Looking at the source code, I don't understand why you did this. It seems to me the function could still accommodate the specified-grid operating mode. Anyhow, is there some simple work-around I'm not seeing? I'd appreciate your advice. |
GitHub doesn't seem to be making it obvious, so I'll clarify that the preceding comment is directed to @NicolasHug. |
Honestly I don't exactly remember. I assume it's because with the additional support of the brute method, the interactions between Unless something went wrong, you should have been warned long ago about the deprecation and ultimate removal of these previous functions. |
You can still pass |
I wasn't. I was aware of your efforts to support a broader class of models, which I applaud. I wasn't aware of the removal of the specified-grid operating mode until users of my package informed me the package was broken. (I haven't been using it myself recently.)
It doesn't. I could work around the problem by writing my own version of the partial_dependence function, supporting exactly my use case. However, it would depend on functions that aren't parts of the public API and that therefore could be changed at any time. It would be safer to create my own complete implementation. I don't have time to deal with either option right now, but I'll decide what to do and do it early next month. |
I think there may have been no explicit warning about grid because
backwards compatibility issues disappeared when we moved this to a
different subpackage. It might be appropriate to solve this usage, but it
would be best reported as a separate issue rather than a comment on a
merged pull request @ralphhaygood.
|
Reference Issues/PRs
This is the continuation of #5653. Lots of tests and checks have been added, with a few fixes. More detailed changes from #5653 can be found here #5653 (comment).
Closes #5653
Closes #4405
What does this implement/fix? Explain your changes.
This PR implements support for partial dependence plots with any regressor or classifier that has
predict_proba
.Any other comments?
Partial dependence plots were only supported for gradient boosting trees and the functions were in
ensemble.partial_dependence
. All backward compatibility is preserved, but those functions are deprecated in favor of thesklearn.partial_dependence
module.The
grid
param has been removed in the new implementation.The
ax
param was replaced byfig
. The claim that the new plots were plotted on theax
argument was wrong.Some possible improvements
In separate PRs:
ax
object.