Aan de slagGa gratis aan de slag

Loading models from the Model Registry

In this exercise, you will use the scikit-learn flavor to deploy the most stable "Insurance" model from the MLflow Model Registry and then use test data to get a prediction from the model.

The model uses LogisticRegression to predict whether an insurance claim is for a male or female, which is labeled as 1 or 0. You'll load the model and then make predictions using a test set called X_test.

The MLflow module will be imported.

Deze oefening maakt deel uit van de cursus

Introduction to MLflow

Cursus bekijken

Oefeninstructies

  • With the scikit-learn flavor, load the "Production" version of the "Insurance" model using the convention for fetching models from the Registry as the model URI.
  • Using the loaded model, run a prediction on the test data from train_test_split used during training the model.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Load the Production stage of Insurance model using scikit-learn flavor
model = ____.____.____("____")

# Run prediction on our test data
____.____(____)
Code bewerken en uitvoeren