← Back to all work
CASE STUDY / 04ML / Analytics

Customer Churn Prediction

AI dashboard that turns telco data into retention decisions.

Customer Churn Prediction interface preview
FIELD
AI / ML · Customer analytics · Telecom / SaaS retention
TYPE
ML / Analytics
YEAR
2026
STATUS
Open source

The idea behind it.

This project is a full-stack AI product for predicting customer churn. A Flask API serves a calibrated XGBoost pipeline; a React + Tailwind dashboard walks operators through a multi-step customer profile wizard and returns probability, confidence, and risk verdicts.

Training is production-oriented: OneHot preprocessing, stratified CV hyperparameter search, isotonic probability calibration, and threshold optimization aimed at maximizing recall under a precision floor (business-aligned objective, not vanity accuracy).

Benchmarking across model families selected XGBoost as the winner, with optimized metrics around ~0.66 recall, ~0.60 precision, and ROC-AUC ~0.84 — packaged as deployable model artifacts with a documented report.

What it does

  • Multi-step prediction wizard (demographics → services → contract → financials)
  • Animated churn probability gauge and risk verdict
  • Calibrated probabilities with tunable decision threshold
  • Business objective: maximize recall with precision ≥ 0.60
  • Feature engineering (avg monthly spend, active services count)
  • Model benchmarking leaderboard across families
  • Dark professional UI, fully responsive
  • REST API: POST /predict and GET /health

Where it fits

  • Telecom and subscription businesses ranking who is likely to leave
  • Retention teams prioritizing outreach when churn risk crosses a threshold
  • Data science teams demoing calibrated ML in a product UI, not only notebooks
  • Product managers stress-testing threshold trade-offs (precision vs recall)

The challenges

  • Imbalanced churn labels and choosing metrics that match business cost
  • Calibrating probabilities so operators can trust risk scores
  • Packaging training artifacts for repeatable inference in Flask

What I took away

  • Thresholds should optimize business objectives, not default 0.5
  • Calibration and feature engineering move the needle as much as model choice
  • A clear API + wizard UX makes ML usable for non-ML stakeholders
KEEP EXPLORING

More things I've built.

04 / HAVE SOMETHING IN MIND?

Let's make
something matter.

Open to opportunities, interesting ideas, and good conversations.