Skip to content

Conversation

@rprkh
Copy link
Contributor

@rprkh rprkh commented Jan 7, 2023

Reference Issues/PRs

Towards #24916

What does this implement/fix? Explain your changes.

  • Included check_is_fitted in get_feature_names_out for _BaseStacking which is inherited by both stacking classifier and stacking regressor
  • Included check_is_fitted for VotingClassifer and VotingRegressor as _BaseVoting does not have any function get_feature_names_out

Any other comments?

Test passes pytest -vsl sklearn/tests/test_common.py -k estimators_get_feature_names_out_error

@glemaitre glemaitre self-requested a review January 14, 2023 14:16
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.

Otherwise LGTM.

Comment on lines 53 to 54
- :class:`ensemble.StackingClassifier`
- :class:`ensemble.StackingRegressor`
Copy link
Member

Choose a reason for hiding this comment

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

Can you put these entries in alphabetric order?

@rprkh rprkh changed the title ENH Raise NotFittedError in get_feature_names_out for Stacking Classifier and Stacking Regressor ENH Raise NotFittedError in get_feature_names_out for Stacking and Voting - Classifier and Regressor Jan 14, 2023
@rprkh
Copy link
Contributor Author

rprkh commented Jan 14, 2023

Hey @glemaitre based on #24916 (comment) I extended this PR to include VotingClassifier and VotingRegressor so that it is easier to review.

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.

Still LGTM.

@betatim betatim added the Quick Review For PRs that are quick to review label Jan 16, 2023
Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

LGTM.

@jjerphan jjerphan merged commit 2e63d2e into scikit-learn:main Jan 17, 2023
@rprkh rprkh deleted the enh_not_fitted branch January 17, 2023 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:ensemble Quick Review For PRs that are quick to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants