A machine learning project designed to identify customers at risk of churn using customer usage, revenue, service quality, device, tenure and demographic signals.
Customers analyzed
Observed churn rate
Models evaluated
Main prediction model
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.
Client and record datasets were merged using Customer_ID to create the modeling dataset.
Engineered signals include call failure rate, call completion rate, overage ratio, revenue per minute, wireless-to-wireless ratio and off-peak usage.
Logistic Regression, Random Forest and XGBoost were trained and evaluated using a stratified train/test split.
The notebook uses a structured preprocessing and modeling workflow before evaluating customer churn predictions.
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 |
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.
The model uses customer usage, service quality, customer information and engineered behavioral indicators.
The notebook converts predicted churn probabilities into four risk tiers to support retention-program targeting.
Churn score: 0 – 35%
Churn score: 35 – 60%
Churn score: 60 – 80%
Churn score: 80 – 100%
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.
The original Jupyter notebook contains the complete exploratory data analysis, feature engineering, model training, evaluation, threshold optimization and risk segmentation.