ENH: Add feature_names_ property to PolynomialFeatures#6216
ENH: Add feature_names_ property to PolynomialFeatures#6216maniteja123 wants to merge 1 commit intoscikit-learn:masterfrom
Conversation
|
There are multiple features, your approach doesn't take that in consideration. For polynomial with degree 2, 3 features, we need: I generated it with: |
|
Thanks for clarifying. So the property expected is the output feature mapping in terms of the polynomials of input features. Will do that and let you know. |
|
Hi everyone, the suggestion by @aniryou seems to be solving the use case here. I don't think I have enough exposure in this domain to decide on the best approach to take. Please let me know if it would be ideal to go ahead with his idea. I will proceed as per the consensus reached here. Thanks. |
|
|
||
| feature_names_ : list, shape [n_input_features_] | ||
| Represents the names of input features | ||
| It is of the form ``['X1', 'X2', 'X3'...]`` |
There was a problem hiding this comment.
They should be lower-case. upper case indicates matrices. Also, these are the output features, right?
|
I think @aniryou's version is the better one to use. Also I agree that this should be a |
|
Thanks for clarifying. It would indeed be better if someone experienced completes it. Sorry I didn't get to do the right thing here. Closing this as it is superseded by #6372. |
Added the property of
feature_names_forPolynomialFeaturesinpreprocessing. See issue #6185. I am not totally sure this is the expected solution. Please let me know if something else needs to be done. Thanks.