hummingbird.ml.operator_converters.sklearn.pipeline

Converters for operators necessary for supporting scikit-learn Pipelines.

class hummingbird.ml.operator_converters.sklearn.pipeline.Multiply(*args: Any, **kwargs: Any)[source]

Bases: PhysicalOperator, Module

Module used to multiply features in a pipeline by a score.

_abc_impl = <_abc_data object>
forward(x)[source]
hummingbird.ml.operator_converters.sklearn.pipeline.convert_sklearn_array_feature_extractor(operator, device, extra_config)[source]

Converter for ArrayFeatureExtractor.

Args:

operator: An operator wrapping a ArrayFeatureExtractor operator 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.pipeline.convert_sklearn_concat(operator, device=None, extra_config={})[source]

Converter for concat operators injected when parsing Sklearn pipelines.

Args:

operator: An empty operator 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.pipeline.convert_sklearn_multiply(operator, device=None, extra_config={})[source]

Converter for multiply operators injected when parsing Sklearn pipelines.

Args:

operator: An empty operator 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