hummingbird.ml.operator_converters.sklearn.decision_tree

Converters for scikit-learn decision-tree-based models: DecisionTree, RandomForest and ExtraTrees.

hummingbird.ml.operator_converters.sklearn.decision_tree.convert_sklearn_decision_tree_classifier(operator, device, extra_config)[source]

Converter for sklearn.tree.DecisionTreeClassifier.

Args:

operator: An operator wrapping a sklearn.tree.DecisionTreeClassifier 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.decision_tree.convert_sklearn_decision_tree_regressor(operator, device, extra_config)[source]

Converter for sklearn.tree.DecisionTreeRegressor.

Args:

operator: An operator wrapping a sklearn.tree.DecisionTreeRegressor 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.decision_tree.convert_sklearn_random_forest_classifier(operator, device, extra_config)[source]

Converter for sklearn.ensemble.RandomForestClassifier and sklearn.ensemble.ExtraTreesClassifier.

Args:

operator: An operator wrapping a tree (ensemble) classifier 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.decision_tree.convert_sklearn_random_forest_regressor(operator, device, extra_config)[source]

Converter for sklearn.ensemble.RandomForestRegressor and sklearn.ensemble.ExtraTreesRegressor

Args:

operator: An operator wrapping the RandomForestRegressor and ExtraTreesRegressor 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