-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
[MRG] Fast PDP for DecisionTreeRegressor and RandomForestRegressor #15864
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
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
74d369f
WIP
NicolasHug 17bc2a3
test and doc
NicolasHug 9fe5234
added comment
NicolasHug d8f5ee3
pep8
NicolasHug e52ae50
maybe fix 32 bits issue?
NicolasHug 597006b
skip test if 32 bits
NicolasHug 7d2761e
test recursion instead of brute
NicolasHug 11b6489
use np.testing
NicolasHug 7263640
put back skipif32bits
NicolasHug 3ee45b6
try converting grid to float32
NicolasHug cf0df03
Update sklearn/inspection/tests/test_partial_dependence.py
NicolasHug fb8257b
pep8
NicolasHug db8dc09
still nope
NicolasHug f141732
Merge branch 'master' of github.com:scikit-learn/scikit-learn into pa…
NicolasHug 397ce88
assert tree from DecisionTree and GBDT is exactly the same
NicolasHug be260a0
pep
NicolasHug c09565a
skip if 32 bits but better
NicolasHug 4ec827d
add fast partial dep for regression forest
NicolasHug de09aa4
test name
NicolasHug fe0f6f3
whats new
NicolasHug 07785f9
doc
NicolasHug 2a9470c
Merge branch 'master' of github.com:scikit-learn/scikit-learn into pa…
NicolasHug d7bbce5
Merge branch 'master' of github.com:scikit-learn/scikit-learn into pa…
NicolasHug 5d3badb
Better docs and UG for PDPs
NicolasHug a6a661d
typo
NicolasHug f89ef33
Merge branch 'partial_dep_doc_update' into partial_dep_forest
NicolasHug 2ecd25e
fix import issue
NicolasHug bd94eda
Merge branch 'master' of github.com:scikit-learn/scikit-learn into pa…
NicolasHug fea11a0
Addressed comments
NicolasHug 53962d3
remove constant
NicolasHug b58c3da
Merge branch 'master' of github.com:scikit-learn/scikit-learn into pa…
NicolasHug ec65848
minor docstring correction
NicolasHug a352720
Merge branch 'master' of github.com:scikit-learn/scikit-learn into pa…
NicolasHug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
do you think that it would make sense to avoid this
isinstance
and check forhasattr(estimator, 'compute_partial_dependence')
or a method that could be shared across all these estimators?I could think that library as xgboost or lightgbm or tree base could expose the same method without us checking for type.
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.
that's a nice idea but that means we need to support a new public API, i.e. the interface of
_compute_partial_dependence_recursion
would now be fixedWe would also still need to hardcoded list of supported estimators for the error message.
Maybe we can keep that in mind for later?
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.
Yep we could check how other libraries are exposing this and put all these info in an issue