Skip to content

ENH Adds feature names out to decomposition module #21334

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

Merged

Conversation

thomasjpfan
Copy link
Member

@thomasjpfan thomasjpfan commented Oct 14, 2021

Reference Issues/PRs

Addresses some of #21308

What does this implement/fix? Explain your changes.

This PR adds a _generate_get_feature_names_out that can be used by estimators that generate their own names.

@adrinjalali
Copy link
Member

What do you think of having the get_feature_names_out to be in a parent class/mixin, and having something in the child classes which just returns the number of output feature, like n_features_out_?

@thomasjpfan
Copy link
Member Author

thomasjpfan commented Oct 20, 2021

and having something in the child classes which just returns the number of output feature, like n_features_out_

I didn't want to introduce a public API into this PR. If we go the mixin direction, I think we can go with a private self._n_features_out. We can decide if we want n_features_out_ as public API later.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM, thank you very much!

@adrinjalali
Copy link
Member

whats_new confligt, otherwise LGTM.

@adrinjalali adrinjalali merged commit 87838c2 into scikit-learn:main Oct 27, 2021
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
* ENH Adds feature names out to decomposition module

* DOC Adds whats enw

* REV Removes module not in decomposition

* ENH Uses a mixin

* REV Better merge
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.

3 participants