SimpleImputer should support String type
See original GitHub issueHi,
I’m getting this error:
RuntimeError: Operator SklearnSimpleImputer (type: SklearnSimpleImputer) got an input merged_columns with a wrong type <class 'onnxconverter_common.data_types.StringTensorType'>. Only [<class 'onnxconverter_common.data_types.FloatTensorType'>, <class 'onnxconverter_common.data_types.Int64TensorType'>, <class 'onnxconverter_common.data_types.DoubleTensorType'>] are allowed
But when using the option strategy="most_frequent"
or strategy="constant"
, it supports strings, see https://scikit-learn.org/stable/modules/generated/sklearn.impute.SimpleImputer.html.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14
Top Results From Across the Web
sklearn.impute.SimpleImputer
Can be used with strings or numeric data. If there is more than one such value, only the smallest is returned. If “constant”,...
Read more >Sklearn SimpleImputer Example - Impute Missing Data
SimpleImputer is a class in the sklearn.impute module that can be used to ... but can also handle categorical data represented as strings....
Read more >' not supported between instances of 'str' and 'int' - Stack ...
When I try to gather object class items to impute them, it throws this error. TypeError: '<' not supported between instances of 'str'...
Read more >sklearn SimpleImputer too slow for categorical data ...
I have a data set with categorical features represented as string values and I want to fill-in missing values in it. I've tried...
Read more >How to use the SimpleImputer Class in Machine Learning with ...
Datasets often have missing values and this can cause problems for machine learning algorithms. It is considered good practise to identify ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I get the same error as @victornoel
Hey @xadupre, it has been some time, and there is still one thing that does not work: when I use
None
as the value formissing_values
:I get this error: