XYZ Telecom is experiencing a 26.5% annual customer churn rate, resulting in significant revenue loss every quarter. The Customer Success and Revenue Analytics teams require a data-driven early-warning system that:
- Identifies high-risk customers 60β90 days before churn occurs
- Segments customers by behavioral and demographic risk profiles
- Enables targeted retention campaigns by the marketing team
- Provides explainable predictions that business stakeholders can act on Goal: Reduce customer churn by 8β10% within two quarters through predictive intervention, using machine learning and an interactive Power BI dashboard.
telecom-churn-prediction/
β
βββ data/
β βββ raw/ β Original unmodified dataset (not pushed to Git)
β βββ processed/ β Cleaned & feature-engineered data
β βββ predictions/ β Model output scores for Power BI
β
βββ notebooks/
β βββ 01_data_profiling.ipynb β Initial data understanding
β βββ 02_eda.ipynb β Exploratory Data Analysis
β βββ 03_feature_engineering.ipynb β New feature creation
β βββ 04_modeling.ipynb β Model building & evaluation
β βββ 05_explainability.ipynb β SHAP analysis
β
βββ src/
β βββ preprocess.py β Data cleaning functions
β βββ features.py β Feature engineering pipeline
β βββ model.py β Model training & evaluation
β
βββ powerbi/
β βββ churn_dashboard.pbix β Final Power BI dashboard
β
βββ reports/
β βββ business_summary.pdf β Non-technical stakeholder report
β
βββ requirements.txt
βββ .gitignore
βββ README.md
| Property | Detail |
|---|---|
| Source | IBM Telco Customer Churn β Kaggle |
| Rows | 7,043 customers |
| Columns | 21 features |
| Churn Rate | 26.54% |
| Domain | Telecommunications |
| Feature | Description |
|---|---|
customerID |
Unique customer identifier |
tenure |
Number of months with the company |
MonthlyCharges |
Current monthly bill amount |
TotalCharges |
Total amount charged to date |
Contract |
Contract type (Month-to-month, One year, Two year) |
PaymentMethod |
How the customer pays |
InternetService |
Type of internet service |
TechSupport |
Whether customer has tech support |
Churn |
Target variable β Yes / No |
- Python 3.11 β Core language
- Pandas & NumPy β Data manipulation
- SQL / SQLite β Data storage and querying
- Jupyter Notebook β Analysis environment
- Scikit-learn β Preprocessing, baseline models
- XGBoost / LightGBM β Production-grade gradient boosting
- Imbalanced-learn β SMOTE for handling class imbalance
- SHAP β Model explainability
- Matplotlib / Seaborn / Plotly β EDA charts
- Power BI Desktop β Stakeholder dashboard
- Git & GitHub β Version control
- MLflow β Experiment tracking
Business Problem Definition
β
Data Acquisition (Kaggle)
β
Data Profiling & Quality Check β notebook 01
β
Exploratory Data Analysis β notebook 02
β
Feature Engineering β notebook 03
β
Model Building & Evaluation β notebook 04
β
SHAP Explainability β notebook 05
β
Power BI Dashboard
β
Business Recommendation Report
| Page | Content |
|---|---|
| Executive Summary | Churn rate KPIs, revenue at risk, trend lines |
| Churn Risk Segmentation | CLV vs churn probability scatter, treemap by segment |
| Behavioral Deep Dive | Usage patterns, support tickets, payment failures |
| Model Predictions | Top 500 high-risk customers with churn scores |
| Retention Tracking | Campaign ROI, intervention success rate |
Class Imbalance β Only 26.5% of customers churn. Handled using SMOTE oversampling and evaluated using AUC-ROC and F1-score instead of raw accuracy.
Hidden Data Quality Issues β TotalCharges column stored as string type despite being numerical, containing 11 hidden null values missed by standard checks.
Feature Engineering β Raw columns alone are insufficient. New features created include usage trends, support ticket frequency, and price sensitivity scores.
Temporal Validation β Data split by time (not randomly) to simulate real production model validation.
Business Explainability β SHAP values used to explain every prediction in plain business language, not just model scores.
git clone https://github.com/YOUR_USERNAME/telecom-churn-prediction.git
cd telecom-churn-predictionpython -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # Mac/Linuxpip install -r requirements.txtDownload WA_Fn-UseC_-Telco-Customer-Churn.csv from Kaggle and place it in data/raw/.
jupyter notebookOpen and run notebooks 01 β 02 β 03 β 04 β 05 in sequence.
| Metric | Value |
|---|---|
| Baseline Churn Rate | 26.54% |
| Best Model | TBD |
| AUC-ROC Score | TBD |
| F1 Score | TBD |
| High-Risk Customers Identified | TBD |
| Estimated Revenue at Risk | TBD |
This section will contain non-technical findings written for business stakeholders β segment-wise risk breakdown, recommended retention actions, and estimated ROI of intervention.
Sunil β Aspiring Data Analyst
Building real-world projects to work at top companies.
This project is open source and available under the MIT License.