Skip to content

Conversation

@EdAbati
Copy link
Contributor

@EdAbati EdAbati commented Jul 2, 2022

Reference Issues/PRs

Closes #9104. See also #22145.
Closes #22145

What does this implement/fix? Explain your changes.

I continued the stalled PR #22145.
I decided to change BaseBagging as initially suggested by @cmarmo #9104, because both BaggingRegressor and BaggingClassifier depend on it. With this, I had to make a small update in the __init__ of the IsolationForest too, since it is also subclass of BaseBagging (I believe I should not make a deprecation cycle here, because estimator is not a argument of IsolationForest, but please correct me if I am wrong).

I should have addressed everything in the comments, but please let me know if I missed anything. :)

Any other comments

With this PR all the classes mentioned here #9104 (comment) should be renamed and (I think) #9104 can be closed

@cmarmo
Copy link
Contributor

cmarmo commented Jul 2, 2022

Hi @EdAbati , thanks for your pull request! And thanks for giving a try to my first suggestion! I like your solution! :D
Do you mind checking in the documentation (the .rst files) if there is any occurrence of base_estimator for Bagging and replacing with estimator? I found one in glossary.rst (line 598) but maybe there are some more. Thanks!

@EdAbati
Copy link
Contributor Author

EdAbati commented Jul 2, 2022

Hi @cmarmo , thank you very much for the fast review.
docs should be updated now! :)

@glemaitre glemaitre added this to the 1.2 milestone Sep 7, 2022
@EdAbati
Copy link
Contributor Author

EdAbati commented Sep 7, 2022

@glemaitre I think I added all your suggestion :)

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

I applied my small nitpick suggestion to be inline with our own way to find the deprecation to remove in the future.

On my side, this PR is good to go. We will need a second reviewer.

@glemaitre
Copy link
Member

ping @jeremiedbb @thomasjpfan

@glemaitre glemaitre changed the title MAINT rename base_estimator and base_estimator_ in ensemble class MAINT rename base_estimator and base_estimator_ in ensemble classes Sep 8, 2022
@EdAbati
Copy link
Contributor Author

EdAbati commented Sep 8, 2022

Thank you very much @glemaitre for the help. :)

And apologies for the long back-and-forth, I got a bit confused on what needed to be done. (I hope I didn't make you waste too much time.)

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @EdAbati ! Here are some comments/questions.

@EdAbati
Copy link
Contributor Author

EdAbati commented Sep 8, 2022

Hi @jeremiedbb , thank you for the review! I should have addressed everything.

I have added a fix to the documentation of [RandomTreesEmbedding 2cd0cf2. The docstring said that the estimator used was a ExtraTreeClassifier when it is instead a ExtraTreeRegressor.

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @EdAbati

@jeremiedbb jeremiedbb merged commit 306608e into scikit-learn:main Sep 9, 2022
@glemaitre
Copy link
Member

Nice thanks @EdAbati

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.

base_estimator vs estimator for meta-estimators

5 participants