-
-
Notifications
You must be signed in to change notification settings - Fork 26k
MAINT Use check_scalar in BaseDecisionTree #21990
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
ogrisel
merged 43 commits into
scikit-learn:main
from
genvalen:BaseDecisionTree_add_check_scalar
Jan 24, 2022
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
47997ee
max_depth: add tests
genvalen 02fc4af
max_depth: add validation
genvalen 0ab5535
min_sample_split: add tests and validation
genvalen 88b13d6
min_impurity_decrease: add tests and valiation
genvalen 645fc22
fix lint issue
genvalen 69c4347
max_leaf_nodes: add tests and validation
genvalen a2c8c4b
min_weight_fraction_leaf: add tests and validation
genvalen 4100bbd
format files w/ black
genvalen ec647de
remove comments
genvalen 9bc6582
min_samples_leaf: add tests and validation
genvalen c850f6c
max_features: add tests and validation
genvalen 4fe47d0
min_samples_split: update
genvalen 44c5afc
max_leaf_nodes: remove redundant tests
genvalen 12eb88a
remove redundant tests
genvalen 664aa88
Merge branch 'BaseDecisionTree_add_check_scalar' of https://github.co…
genvalen 60a215f
Fix lint issue
genvalen e845597
update range for min_weight_fraction_leaf
genvalen 9bdb404
Merge branch 'main' of https://github.com/scikit-learn/scikit-learn i…
genvalen 6eb026c
remove redundant tests
genvalen b9a5091
min_samples_split: update to include upper bound
genvalen eb8bacb
slight style edit to tests
genvalen 1060fd7
update boundary inclusivity for max_features
genvalen f5973f8
update order of tests
genvalen 5c5769b
update order of validations to match signature more closely
genvalen 2e4528d
remove some boundary args to rely on defaults more and reduce lines
genvalen dfb4b87
ccp_alpha: add tests and validation
genvalen fa7a486
edit comment
genvalen 4267678
Update sklearn/tree/_classes.py
genvalen 9d1bed6
min_samples_split: update tests
genvalen 63a5a93
ccp_alpha: remove redundant tests
genvalen 5cf4fa3
update check scalar calls to explicitly reference "name" param
genvalen 0b89587
Update sklearn/tree/_classes.py
genvalen a61e73c
update tests for min_samples_split
genvalen 51e0980
update messages in test_gbdt_parameter_checks to pass CI
genvalen 5eda80a
Update sklearn/ensemble/tests/test_gradient_boosting.py
genvalen a65e9bf
Put test_max_features back on line 504
genvalen 5e5b381
fix lint issue
genvalen 3a424c2
Update sklearn/tree/_classes.py
genvalen 521a35c
Revert "update tests for min_samples_split"
genvalen ce3f22d
update min_val for min_samples_split
genvalen 9357c87
Update sklearn/tree/_classes.py
genvalen 733a3c8
Update sklearn/tree/_classes.py
genvalen 9167c47
update tests
genvalen 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
Oops, something went wrong.
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.
Here there is a subtle ambiguity for
1
that could be anIntegral
orReal
whether one pass1.0
or1
.Basically, I would expect:
None
allows taking all features.1
as an integer will select one feature.1.0
as a real should not be included.But I am not really sure what is the best here. Maybe @thomasjpfan or @ogrisel remember how we want to make the validation for this ambiguity.
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.
My impression was that
1.0
means "take all the features", which is inline with the current implementation.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.
Looking at different places it seems that we do the same as stated by @thomasjpfan. I am still not a super fan that we can pass both
1
and1.0
and that they will have different behaviour.