onnx / sklearn-onnx

Convert scikit-learn models and pipelines to ONNX
Apache License 2.0
525 stars 98 forks source link

Correct way of converting HistGradientBoostingRegressor with categorical_features? #1101

Open ogencoglu opened 1 month ago

ogencoglu commented 1 month ago

HistGradientBoostingRegressor supports specification of categorical_features: https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.HistGradientBoostingRegressor.html#sklearn.ensemble.HistGradientBoostingRegressor

What would be the correct initial_type in convert_sklearn(model, initial_types) to achieve this behaviour. Float inputs to ONNX are giving wrong predictions of course.

ogencoglu commented 1 month ago

Pinging @maximilianeber in case you found out a way

maximilianeber commented 1 month ago

Pinging @maximilianeber in case you found out a way

Replied in the original thread in https://github.com/onnx/sklearn-onnx/issues/1051. We haven't managed to work around this and stuck to OHE for now.