Skip to content
All projects
  • Machine Learning / AI
  • Data Science
  • Business Intelligence

Customer Churn Prediction & Retention Intelligence

From churn probability to a named retention play with an owner and a cost.

An end-to-end churn system for a subscription business: a simulated 24-month customer history, a SQL warehouse, a leakage-safe feature pipeline, four benchmarked models, SHAP explanations in plain English, and a Streamlit dashboard that turns each probability into an actionable retention play.

  • Python
  • SQL
  • Pandas
  • NumPy
  • Scikit-learn
  • Joblib
  • Streamlit
  • Matplotlib

01

Project overview

What it does
A complete churn workflow, from raw subscription history to a dashboard that tells a retention team who to contact, what to offer, who owns it and what it costs.
Why I built it
Most churn projects stop at a ROC curve. The useful part is the decision that comes after the score.
What it solves
A probability on its own doesn't tell anyone what to do. Retention teams need an action, an owner and a budget.
Who it's for
Retention, customer success and growth teams at subscription businesses.

02

The problem

Churn models are easy to build badly: features that leak future information inflate accuracy, and outputs stop at a score nobody acts on. The challenge was to build an honest model and connect it to a concrete retention decision.

03

The solution

A simulated 24-month customer history is loaded into a SQL warehouse. A leakage-safe feature pipeline builds point-in-time features, and four models are benchmarked against each other with scikit-learn. SHAP explanations are translated into plain-English reasons, and a Streamlit dashboard maps each customer's probability to a named retention play with an owner and a cost. Trained models are persisted with Joblib.

04

Architecture & workflow

  1. STEP 01

    Data

    Simulated 24-month subscription history

  2. STEP 02

    Warehouse

    SQL tables for customers and events

    • SQL
  3. STEP 03

    Features

    Leakage-safe, point-in-time

    • Pandas
    • NumPy
  4. STEP 04

    Models

    4 benchmarked classifiers

    • Scikit-learn
    • Joblib
  5. STEP 05

    Explain

    SHAP → plain-English reasons

  6. STEP 06

    Act

    Retention play, owner, cost

    • Streamlit
Data flow · source to decision

05

Technology stack

Languages

  • Python
  • SQL

Data Engineering

  • Pandas
  • NumPy

Machine Learning

  • Scikit-learn
  • Joblib

Visualization

  • Streamlit
  • Matplotlib

06

Project demonstration

Scoring a customer and walking through the retention play.

07

Key features

Leakage-safe features

Point-in-time feature construction keeps evaluation honest.

Four-model benchmark

Candidate models compared side by side before one is chosen.

Plain-English reasons

SHAP values translated into explanations a CSM can read.

Actionable plays

Each at-risk customer gets a named play, an owner and a cost.