Search⌘ K
AI Features

Solution Review: Make Predictions and Plot Model

Explore how to make predictions using a classification model in PyCaret, finalize the trained model, and visualize its decision boundaries through plotting, enhancing your hands-on skills in machine learning classification.

We'll cover the following...

Solution

Python 3.5
# Make prediction from `classification_model` and assign result to `predictions` variable.
predictions = predict_model(classification_model)
# Finalize the model and assign it to the final_model variable.
final_model = finalize_model(classification_model)
# Plot the decision boundaries of the model
plot_model(classification_model, 'boundary')

Explanation

  • Line 3: We make predictions from the ...