-
Notifications
You must be signed in to change notification settings - Fork 87
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
Expose get_feature_names on OneHotEncoder #1193
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1193 +/- ##
=======================================
Coverage 99.92% 99.92%
=======================================
Files 196 196
Lines 11978 11987 +9
=======================================
+ Hits 11969 11978 +9
Misses 9 9
Continue to review full report at Codecov.
|
evalml/pipelines/components/transformers/encoders/onehot_encoder.py
Outdated
Show resolved
Hide resolved
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.
@angela97lin looks great!
I wonder if we'll eventually want to adapt get_feature_names
to be defined in Transformer
. So that we can access the names of features generated by any component.
evalml/pipelines/components/transformers/encoders/onehot_encoder.py
Outdated
Show resolved
Hide resolved
@dsherry Yeah, I could see something like that for the |
Closes #1183
Questions:
ohe.get_feature_names(input_features)
to be called on the entire data set (https://github.com/scikit-learn/scikit-learn/blob/0fb307bf3/sklearn/preprocessing/_encoders.py#L580). Do we want to loosen this restriction? Unclear since I'm not sure exactly what context this will be used in. For now, could be sufficient to just follow impl and add as a later PR if the need arises.