-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
ENH Adds feature_names_out to stacking estimators #22695
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
ENH Adds feature_names_out to stacking estimators #22695
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.
Thanks for the PR. Here are some comments below.
For information, I checked that StackingRegressor
does not currently allow multi-target regression, even if the base regressors do.
If it were the case the code should be adjusted accordingly, or at least a new test should be added to check that it works as expected.
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!
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. Thanks @thomasjpfan
Reference Issues/PRs
Towards #21308
What does this implement/fix? Explain your changes.
This PR adds
get_feature_names_out
to Stacking. The feature names uses the name of the estimator that generated the prediction.Any other comments?
The
test_transformers_get_feature_names_out
common tests will run on these estimators because they defineget_feature_names_out
:scikit-learn/sklearn/tests/test_common.py
Lines 394 to 396 in 1c24595