Skip to content

[sklearn] OneHotEncoder does't work correctly #684

@faterazer

Description

@faterazer

Hello, I found this project last week, and thanks for all of these work.

I installed Hummingbird-ml==0.47 by pip, and I want to know which version of sklearn should I use.

I want to use one-hot encoder of sklearn to preprocess my categorical features, but the result's dim of sklearn is different from the dim of converted pytorch model. For sklearn, 15 features -> 69 dim,but for converted pytorch mdoel, 15 features -> 76 dim.

After my check, I'm sure the problem is the argument of sklearn's OneHotEncoder:

Changed in version 1.1: 'infrequent_if_exist' was added to automatically handle unknown categories and infrequent categories.

Is there any way to solve this problem?Thanks for any solution!

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions