This is a Turi sample for churn prediction. Explore the gallery to see other examples.
This sample code shows how to build, evaluate, and deploy a model to predict customer churn. You could use this model to find customers who are likely to stop using your product or service.
-
Before you begin, make sure you have installed GraphLab Create 1.9, a Python package for machine learning.
-
Download and extract the example code to a directory on your machine, or clone it with the following command:
git clone http://github.com/turi-code/sample-churn-predictor cd sample-churn-predictor
-
While in the
sample-churn-predictor
directory, run the following script to download the sample project data:
python download_data.py
-
Making sure you are working in a Python environment with GraphLab Create installed, run the
churn_predictor.py
script to build and explore the model on your machine:python -i churn_predictor.py
The
-i
flag causes Python to drop into an interactive interpreter after the script executes.Once the model has been created, a browser window should open to let you explore and interact with your model.
Alternatively, you can also run the provided IPython Notebook:
ipython notebook churn_predictor.ipynb
If you are having trouble, please create a Github Issue or start a discussion on the user forum.