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.
FIX Enable setting of sub-parameters for deprecated base_estimator param #25477
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
FIX Enable setting of sub-parameters for deprecated base_estimator param #25477
Changes from all commits
698ddac
3d6d13c
2b13d8b
88407d5
a331227
89ee48f
8be004e
5c4b441
d20c386
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Not actionable: It would be harder for third party estimators to deprecate a positional parameter because they would also need adjust
set_params
to still work with the previous name.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.
actually here we are setting
estimator
and notbase_estimator
. It is completely fine that it works. However, could we parametrize the non-regression test to check that both works when settingestimator
andbase_estimator
.It could also be work to call
fit
just to make sure that there is not latter side-effect.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 think this test is enough. If
clf = AdaBoostClassifier(base_estimator=DecisionTreeClassifier())
then I would expect that the warning would be raised at__init__
fit
time and no warning would be raised when callingclf.set_params(base_estimator__max_depth=2)
.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.
This is indeed what happens. I also think the warning at
fit
time is enough in this case.