scikit-learn¶
The registry supports models created using scikit-learn (models derived from sklearn.base.BaseEstimator or
sklearn.pipeline.Pipeline).
The following additional options can be used in the options dictionary
when you call log_model:
| Option | Description |
|---|---|
target_methods | A list of the names of the methods available on the model object. scikit-learn models have the following target methods by default, assuming the method exists: predict, transform, predict_proba, predict_log_proba, decision_function. |
You must specify either the sample_input_data or signatures parameter when logging a scikit-learn model
so that the registry knows the signatures of the target methods.
Example¶
In this example, a RandomForestClassifier and Pipeline are trained and logged to the model registry.
Note
You can combine scikit-learn preprocessing with a XGBoost model as a scikit-learn pipeline.