A/B Analysis for a Recommendation Model
Estimated completion time: 14 min.
Overview
In this tutorial, you will learn how to retrospectively compare the behavior of two different models.
By the end of this tutorial you will know how to:
Set up an A/B application
Analyze production data
Prerequisites
Set Up an A/B Application
Prepare a model for uploading
lightfm==1.15
numpy~=1.18
joblib~=0.15
tqdm~=4.62.0Install the dependencies in your local environment.
Upload Model A
We train and upload our model with 5 components as movie_rec:v1
Upload Model B
Next, we train and upload a new version of our original model with 20 components as movie_rec:v2
We can check that we have multiple versions of our model by running:
Create an Application
To create an A/B deployment we need to create an Application with a single execution stage consisting of two model variants. These model variants are our Model A and Model B correspondingly.
The following code will create such an application:
Invoking movie-ab-app
movie-ab-appWe'll simulate production data flow by repeatedly asking our model for recommendations.
Last updated
Was this helpful?