Going from a predictive model to productive deployment

Original Source Here

Going from a predictive model to productive deployment

Photo by Daniele Levis Pelusi on Unsplash

An accurate predictive model has no value unless deployed for productive use. What does it take to have a predictive model ready for production deployment? Though there are many technical requirements, I will focus on what is needed from a business perspective.

Let us take a business scenario of churn prediction for a telecommunication company. To add some action to our story, let us assume the data scientist team has developed a cutting-edge machine learning model, as well as shown promising accuracy . The model is now used to list customers who are predicted to churn, as shown below.

The list, as shown below, is perfect for a Kaggle-style data science competition. However, it is catastrophic from a business point of view.

customer id and churn prediction (image by author)

The problem with the list above is that it is not actionable. The business would not know what to do with it and how to use it to reduce churn. So let us look at how to make the model results more actionable.

Adding Probability helps in prioritization

A large enterprise can have 10 to 100 million customers. If you take an average 5% churn rate, the list of customers who would churn would have millions of customers. With such a long list, business users need some way to prioritize.

Adding probability helps in prioritization.

adding prioritization (image by author)

In the example above, the customer 6894-LFHLY and 9767-FFLEM need to be contacted on a priority basis, as they have a high probability to churn. It is an elegant way to make the model output more actionable.

So, during the development process, always prefer models which give probability in addition to the predictions.

Connect with operational data

To take the next step in making the model output more actionable, it is important to know more about the customer who is predicted to churn. This requires connecting the predictions with operational data as shown below.

connecting with operational data (image by author)

Now the business users have a better idea of the customer which is predicted to churn. This is very useful while contacting the customer in order to prevent churn.

Integrating model scores with operational data is an important to step towards the deployment

Explaining the prediction and reasons for churn

Business is now ready to contact the customer to prevent churn. However, there is one thing missing, which is prediction explanations. When the customer is contacted to prevent churn, the business user needs to have a clear idea of why the churn is predicted. This helps in better negotiating with the customer.

Prediction explainer (image by author)

The visualization above is a prediction explainer (using the SHAP algorithm) for customer 6894-LFHLY. The upward-going bars are reasons why churn is predicted. The top reasons why churn is predicted is because the customer has a short monthly contract, high total charges as well as a very less tenure of one month.

Looking at the reasons for churn, the business can adopt a strategy, such as converting customers to long-term contracts and offering some discounts on monthly charges.

The prediction explanation gives a direction on how to act on prediction results


Making an accurate model is not sufficient for production deployment. One needs to add probability, connect with operational data, as well as have a prediction explanation, in order to make model results actionable.

Datasource citation

The dataset used in this blog is from a telecommunication dataset available here. Both commercial and non-commercial use of it is permitted.

Please join Medium with my referral link.

Please subscribe to stay informed whenever I release a new story.


Additional Resources


You can visit my website to make analytics with zero coding. https://experiencedatascience.com

On the website, you can also participate in upcoming AI workshops for an interesting and innovative data science and AI experience.

Youtube channel

Here is a link to my YouTube channel


Trending AI/ML Article Identified & Digested via Granola by Ramsey Elbasheer; a Machine-Driven RSS Bot

%d bloggers like this: