Full-Stack ML · XGBoost · SHAP

Customer Churn Analytics Platform

Overview

A production-structured ML platform for customer churn prediction. The system covers the full pipeline from model training and evaluation to API serving, interactive dashboards, and containerized deployment — built as a complete, runnable application rather than a notebook demo.

What was built

  • XGBoost churn classifier trained with 5-fold cross-validation (ROC-AUC 0.84 ± 0.01), with SHAP explainability to surface per-customer feature attribution.
  • FastAPI backend with SQLAlchemy ORM and PostgreSQL 15 — REST endpoints for predictions, batch scoring, and SHAP value retrieval.
  • React 18 + Vite frontend with five dedicated dashboard views: overview, customer risk table, SHAP analysis, cohort comparison, and model performance metrics.
  • Recharts for interactive visualization of churn risk distributions, feature importance, and model evaluation curves.
  • Docker Compose setup — backend, frontend, and database launch with a single command, no manual environment configuration.
  • Organized directory structure: backend/, frontend/, ml/, data/ — clean separation of concerns across the stack.

Why it matters

Most churn projects stop at a Jupyter notebook. This one is structured as a deployable service: model artifacts are persisted, predictions are served over HTTP, and results are consumable by a frontend built for a business audience. SHAP explainability makes the model's decisions auditable, not just accurate.

Project Info

  • Category: Full-Stack ML Application
  • Model: XGBoost — ROC-AUC 0.84 (5-fold CV)
  • Stack: XGBoost, SHAP, FastAPI, React 18, PostgreSQL, Docker, Recharts
  • GitHub: churn-analytics-platform