top of page

End-To-End Churn Prediction

A project that goes through the entire ML process to deploy a model which predicts customer churn

Utilizing machine learning (ML) to solve business problems involves so much more than simply tuning and training a good model - the model's intelligence must be made actionable to provide value.

​

In my End-to-End Churn Prediction project, I go through every stage of the ML lifecycle to deploy a model that allows a telecom company to predict whether or not a customer will churn (i.e. unsubscribe from the company's services) in the next month.

​

Try using the application below! Hit Random to generate data and then Submit it to get a prediction! (startup takes a few seconds after hitting Submit)

​

Build it yourself!

​

I've provided all the code necessary to complete this project yourself on Github, which you can find here!

​

Check out the Jupyter notebook below to follow along to get a taste of the end-to-end ML lifecycle!

Jupyter Notebook - PDF or Github

​

Model Building

​

First I go through the model building process in Jupyter. We perform:

​

​     1. Problem & Goal Specification

​

     2. Data Gathering, Cleaning, and Transformation

            - Including ordinal, one-hot, and dummy indexing for categorical variables

​

     3. Exploratory Data Analysis

            - Including looking at class frequencies and bivariate correlations

​

     4. Feature Selection and Engineering

            - Including calculating VIFs, performing Chi-Squared tests, and scaling numerical features

​

     5. Model Selection

            - Including comments about class imbalance

​

     6. Model Training & Hyperparameter Tuning

​

     7. Model Testing & Evaluation

​

Backend Flask API

​

Next, I go through ​the process of building and deploying a Flask API on the backend. We:

​

​     1. Create an AWS IAM User

​

     2. Upload our model to S3

​

     3. Create a Flask API 

            - The API fetches the files from S3 using the IAM keys and uses them to return predictions

​

     4. Deploy the API on PythonAnywhere

            - This deployment will allow our frontend to access the API

​

Frontend React App

​

Finally, I go through the process of developing a React frontend. We:​

​

​     1. Create a build from the React App

​

     2. Deploy it using Netlify

Try the Application!
GitHub and Jupyter
Model Building
Backend Flask API
Frontend React App
bottom of page