Build a customer churn predictor using Watson Studio and Jupyter Notebooks – IBM Developer

Build cloud-native applications for regulated workloads with IBM Cloud for Financial Services Learn more

Archived | Build a customer churn predictor using Watson Studio and Jupyter Notebooks

Archived content

Archive date: 2019-06-04

This content is no longer being updated or maintained. The content is provided “as is.” Given the rapid evolution of technology, some content, steps, or illustrations may have changed.


This code pattern walks you through the full cycle of a data science project. You begin by understanding the business perspective of the problem – here we used customer churn. Then, you use the available data set to gain insights and build a predictive model for use with future data. You’ll deploy the model into production and use it to score data collected from a user interface.


Customer churn, when a customer ends their relationship with a business, is one of the most basic factors in determining the revenue of a business. You need to know which of your customers are loyal and which are at risk of churning, and you need to know the factors that affect these decisions from a customer perspective. This code pattern explains how to build a machine learning model and use it to predict whether a customer is at risk of churning. This is a full data science project, and you can use your model findings for prescriptive analysis later or for targeted marketing.

When you have completed this code pattern, you’ll understand how to:

  • Use Jupyter Notebooks to load, visualize, and analyze data
  • Run Notebooks in IBM Watson Studio
  • Load data from IBM Cloud Object Storage
  • Build, test, and compare different machine learning models using scikit-learn
  • Deploy a selected machine learning model to production using Watson Studio
  • Create a front-end application to interface with the client and start consuming your deployed model



  1. Understand the business problem.
  2. Load the provided Notebook into the Watson Studio platform.
  3. The Telco customer churn data set is loaded into the Jupyter Notebook.
  4. Describe, analyze, and visualize data in the notebook.
  5. Pre-process the data, build machine learning models, and test them.
  6. Deploy a selected machine learning model to production.
  7. Interact and consume your model using a front-end application.


Find the detailed instructions in the readme file. These instructions show you how to:

  1. Sign up for Watson Studio.
  2. Create a new project.
  3. Upload the data set.
  4. Import the Notebook to Watson Studio.
  5. Import the data set into the Notebook.
  6. Follow the steps in the Notebook.
  7. Create a Watson Machine Learning Service instance.
  8. Either deploy to IBM Cloud or deploy locally.