Skip to content
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

Column naming: compatibility with OneHotEncoder #241

Open
stacymiller opened this issue Mar 3, 2021 · 2 comments · May be fixed by #248
Open

Column naming: compatibility with OneHotEncoder #241

stacymiller opened this issue Mar 3, 2021 · 2 comments · May be fixed by #248

Comments

@stacymiller
Copy link

In sklearn v0.24.1 OneHotEncoder transformer exposes derived names in the categories_ attribute. Can we add one more check to

def _get_feature_names(estimator):
to cover this case?

@ragrawal
Copy link
Collaborator

ragrawal commented May 8, 2021

Sure, can you create a MR and add a unit test. I will be happy to merge it.

@falcaopetri
Copy link

The categories_ attribute does not represent the derived feature names. It actually contains The categories of each feature determined during fitting, see OneHotEncoder.categories_).

Nonetheless, sklearn 1.0 transformer's get_output_names is getting deprecated in favor of get_feature_names_out. More info in PR #248.

@ragrawal ragrawal linked a pull request Oct 18, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants