Skip to content

All projects

Telco Customer Churn Analysis & Prediction

An end-to-end machine learning project that analyzes telecom customer behavior and predicts churn using Logistic Regression and Random Forest, achieving 0.842 ROC-AUC and delivering actionable customer retention insights.

Screenshot of Telco Customer Churn Analysis & Prediction

Problem

Customer churn is a major challenge for telecommunications companies because losing existing subscribers reduces recurring revenue and increases customer acquisition costs. Without reliable predictive insights, retention teams may struggle to identify at-risk customers and prioritize their outreach.

This project aimed to identify customer characteristics associated with churn and develop a predictive model to estimate individual churn probabilities using IBM's dataset of 7,043 telecom customers.

Approach

Conducted exploratory data analysis to examine relationships between churn and customer tenure, contract type, payment methods, monthly charges, and subscribed services.

Built scikit-learn preprocessing pipelines with median and most-frequent imputation, numerical scaling, and one-hot encoding. Used a stratified 80/20 train-test split and integrated preprocessing into model pipelines to prevent data leakage.

Compared class-weighted Logistic Regression with standard and class-balanced Random Forest classifiers. Evaluated the models using ROC-AUC, PR-AUC, F1-score, confusion matrices, and stratified cross-validation. Selected Logistic Regression based on its performance and interpretability, examined influential features, and developed a Streamlit prediction interface.

Outcome

The selected class-weighted Logistic Regression model achieved 0.842 ROC-AUC, 0.633 PR-AUC, and 0.614 F1-score on the held-out test set. Stratified cross-validation produced a ROC-AUC of 0.846 ± 0.012, indicating consistent performance across validation folds.

The model outperformed the tested Random Forest configurations on the reported metrics and was integrated into a Streamlit application that estimates individual churn probabilities and displays risk-based retention suggestions. The analysis also generated practical recommendations for customer retention, onboarding, contract incentives, and payment methods.

Highlights

  • Achieved 0.842 ROC-AUC and 0.614 F1-score on the held-out test set
  • Analyzed 7,043 telecom customer records to investigate churn patterns
  • Built leakage-resistant preprocessing pipelines using scikit-learn
  • Compared Logistic Regression and Random Forest with class imbalance handling
  • Achieved 0.846 ± 0.012 cross-validated ROC-AUC
  • Developed an interactive Streamlit customer churn prediction interface

Notes

Developed an end-to-end customer churn prediction solution using IBM's Telco Customer Churn dataset, containing 7,043 customer records. The project covers data cleaning, exploratory data analysis, feature engineering, model training, evaluation, and an interactive prediction application.

Built leakage-resistant preprocessing pipelines for numerical and categorical features using scikit-learn. Trained and evaluated Logistic Regression and Random Forest classifiers, addressing class imbalance and assessing performance with ROC-AUC, PR-AUC, F1-score, confusion matrices, and stratified cross-validation.

Selected class-weighted Logistic Regression, achieving 0.842 ROC-AUC, 0.633 PR-AUC, and 0.614 F1-score on the held-out test set. Interpreted the results to identify customer retention opportunities and developed a Streamlit interface for estimating individual customer churn probabilities.