MACHINE LEARNING • TELECOM ANALYTICS

Customer Churn
Prediction

A machine learning project designed to identify customers at risk of churn using customer usage, revenue, service quality, device, tenure and demographic signals.

100K

Customers analyzed

49.6%

Observed churn rate

3

Models evaluated

XGBoost

Main prediction model

01 — Overview

Project Objective

The goal is to build and evaluate machine learning models that can identify customers at risk of leaving, allowing retention teams to prioritize potential interventions.

📊

Data Analysis

Client and record datasets were merged using Customer_ID to create the modeling dataset.

⚙️

Feature Engineering

Engineered signals include call failure rate, call completion rate, overage ratio, revenue per minute, wireless-to-wireless ratio and off-peak usage.

🎯

Churn Prediction

Logistic Regression, Random Forest and XGBoost were trained and evaluated using a stratified train/test split.

02 — Methodology

Machine Learning Pipeline

The notebook uses a structured preprocessing and modeling workflow before evaluating customer churn predictions.

01 Merge Client + Record data
02 Feature engineering
03 80/20 stratified split
04 Median imputation + scaling
05 Model evaluation
03 — Model Evaluation

Models Compared

Three classification approaches were evaluated using ROC-AUC as the primary metric, with recall as an important business metric.

Model Role Configuration Primary Metric
Logistic Regression Baseline L2 regularization, C=0.1 ROC-AUC
Random Forest Non-linear comparison 300 trees, max depth 12 ROC-AUC
XGBoost Main model 500 trees, learning rate 0.05, max depth 6 ROC-AUC

Evaluation Strategy

The dataset was divided using an 80/20 stratified train/test split. ROC-AUC was selected as the primary discrimination metric, while recall was emphasized because failing to identify a customer who churns can be costly for a retention program.

04 — Feature Engineering

Signals Used by the Model

The model uses customer usage, service quality, customer information and engineered behavioral indicators.

rev_Mean mou_Mean totmrc_Mean change_mou change_rev drop_vce_Mean blck_vce_Mean unan_vce_Mean custcare_Mean months eqpdays hnd_price phones models income totcalls totmou avgmou call_failure_rate call_completion_rate overage_ratio rev_per_min w2w_ratio offpeak_ratio new_cell creditcd crclscod area
05 — Risk Segmentation

Customer Risk Tiers

The notebook converts predicted churn probabilities into four risk tiers to support retention-program targeting.

Low Risk

Churn score: 0 – 35%

Medium Risk

Churn score: 35 – 60%

High Risk

Churn score: 60 – 80%

Critical

Churn score: 80 – 100%

From Prediction to Business Action

The project goes beyond model accuracy by exploring how churn probabilities can support customer retention decisions. A threshold sweep evaluates the trade-off between identifying churners and the cost of contacting customers with retention offers.

Threshold Optimization Decision thresholds are evaluated from 0.10 to 0.89 to study recall, precision and estimated net value.
Retention Targeting Risk tiers can help retention teams prioritize customers according to predicted churn probability.
Feature Insights XGBoost feature importance is used to identify signals contributing to churn predictions.

Explore the Full Analysis

The original Jupyter notebook contains the complete exploratory data analysis, feature engineering, model training, evaluation, threshold optimization and risk segmentation.

Open Notebook →