-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
ENH Raise NotFittedError in get_feature_names_out for Stacking and Voting - Classifier and Regressor #25324
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
Conversation
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.
Otherwise LGTM.
doc/whats_new/v1.3.rst
Outdated
- :class:`ensemble.StackingClassifier` | ||
- :class:`ensemble.StackingRegressor` |
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.
Can you put these entries in alphabetric order?
Hey @glemaitre based on #24916 (comment) I extended this PR to include |
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.
Still LGTM.
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.
LGTM.
Reference Issues/PRs
Towards #24916
What does this implement/fix? Explain your changes.
check_is_fitted
inget_feature_names_out
for_BaseStacking
which is inherited by both stacking classifier and stacking regressorcheck_is_fitted
for VotingClassifer and VotingRegressor as_BaseVoting
does not have any functionget_feature_names_out
Any other comments?
Test passes
pytest -vsl sklearn/tests/test_common.py -k estimators_get_feature_names_out_error