Project 08 / 10 · Forecast & ML

Customer Churn Prediction

Pipeline that predicts at-risk telecom customers, explains every prediction and surfaces retention strategies — built for direct business use.

01 / Context

The problem

The pipeline frames churn as a cost-sensitive retention problem: missing a churner is far more expensive than extending an unnecessary offer, so recall and intervention value matter more than raw accuracy.

02 / System workflow

From input to output

  1. 01IBM Telco data
  2. 02SQL feature layer
  3. 03XGBoost scoring
  4. 04SHAP explanation
  5. 05ROI simulator

03 / Architecture

Inside the system

A1

Data preparation and SQL-engineered features feed an XGBoost classifier tuned with RandomizedSearchCV and stratified five-fold validation.

A2

Global and customer-level SHAP views explain risk, while Kaplan-Meier curves expose time-to-churn differences across contract cohorts.

A3

The Streamlit application combines predictions, threshold control, campaign ROI, model details, and downloadable outputs; Tableau provides an executive story layer.

04 / Engineering decisions

What shaped the build

Decision 01

Optimize for business loss

A 0.35 operating threshold reflects the documented 78-to-1 cost ratio between a missed churner and an unnecessary retention offer.

Decision 02

Test every segment claim

Contract, tenure, support, security, and charge findings are backed by chi-square tests rather than visual inspection.

Decision 03

Keep explanations actionable

Per-customer SHAP waterfalls connect risk scores to the specific attributes a retention team can investigate.

05 / Evidence

Measured, not implied

88%

Churn recall

Holdout performance at the recall-focused threshold.

0.848

CV ROC-AUC

Five-fold mean with ±0.011 standard deviation.

63.46%

Priority segment

Share of churners in the high-charge month-to-month group.

06 / Delivery

What shipped

  • 01The Streamlit interface includes prediction, SHAP analysis, EDA, threshold trade-offs, and campaign ROI.
  • 02Pipeline commands reproduce processing, plots, modeling, explanations, and Tableau exports.
  • 03Automated tests check cleaning and required feature columns before modeling.

Constraint documented

The source dataset lacks support-ticket counts, so service impact uses TechSupport and OnlineSecurity availability as documented proxies.