hummingbird.ml.operator_converters.sklearn.discretizer

Converter for scikit-learn discretizers: Binarizer and KBinsDiscretizer.

hummingbird.ml.operator_converters.sklearn.discretizer.convert_sklearn_binarizer(operator, device, extra_config)[source]

Converter for sklearn.preprocessing.Binarizer

Args:

operator: An operator wrapping a sklearn.preprocessing.Binarizer model device: String defining the type of device the converted operator should be run on extra_config: Extra configuration used to select the best conversion strategy

Returns:

A PyTorch model

hummingbird.ml.operator_converters.sklearn.discretizer.convert_sklearn_k_bins_discretizer(operator, device, extra_config)[source]

Converter for sklearn.preprocessing.KBinsDiscretizer

Args:

operator: An operator wrapping a sklearn.preprocessing.KBinsDiscretizer model device: String defining the type of device the converted operator should be run on extra_config: Extra configuration used to select the best conversion strategy

Returns:

A PyTorch model