hummingbird.ml.operator_converters.sklearn.linear

Converters for scikit-learn linear models: LinearRegression, LogisticRegression, LinearSVC, SGDClassifier, LogisticRegressionCV.

hummingbird.ml.operator_converters.sklearn.linear.convert_sklearn_linear_model(operator, device, extra_config)[source]

Converter for sklearn.svm.LinearSVC, sklearn.linear_model.LogisticRegression, sklearn.linear_model.SGDClassifier, and sklearn.linear_model.LogisticRegressionCV

Args:
operator: An operator wrapping a sklearn.svm.LinearSVC, sklearn.linear_model.LogisticRegression,

sklearn.linear_model.SGDClassifier, or sklearn.linear_model.LogisticRegressionCV 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.linear.convert_sklearn_linear_regression_model(operator, device, extra_config)[source]

Converter for sklearn.linear_model.LinearRegression, sklearn.linear_model.Lasso, sklearn.linear_model.ElasticNet, sklearn.linear_model.Ridge, sklearn.svm.LinearSVR and sklearn.linear_model.RidgeCV

Args:
operator: An operator wrapping a sklearn.linear_model.LinearRegression, sklearn.svm.LinearSVR

or sklearn.linear_model.RidgeCV 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