
Streamlit | Machine Learning Project
Predicting Customer Attrition Using Machine Learning & Analytics
Customer churn is one of the most important metrics for subscription-based businesses. Retaining a customer is significantly cheaper than acquiring a new one, and understanding why customers leave can directly improve revenue and long-term growth.
In this project, I built a complete end-to-end churn prediction system using the Telco Customer Churn Dataset. The project includes exploratory data analysis, feature engineering, model development, and an interactive Streamlit dashboard that allows users to explore churn patterns and predict the churn probability for any customer profile.
This project demonstrates my ability to:
Telecom companies lose substantial revenue every year due to customer churn. Understanding what factors contribute to customer attrition—and which customers are most likely to churn—enables companies to take proactive action.
The key business questions:
I analyzed customer demographics, contract types, billing information, tenure, internet service types, and more to uncover patterns related to churn.
Key insights included:
Charts were used throughout to visualize churn distribution and segment-level differences.
To improve model performance and interpretability:
I built and compared multiple machine learning models, including:
The models were evaluated using accuracy, recall, F1 score, and ROC-AUC. Logistic Regression performed the best overall and offered strong interpretability—critical for business stakeholders.
I developed a Streamlit application with four main sections:
This makes the project hands-on and business-ready.
The models revealed significant drivers of churn, including:
The deployed app enables real-time churn risk scoring, dynamic exploration of customer segments, and clear insight into retention opportunities.
High-level view of key churn metrics including overall churn rate, month-to-month churn rate, average charges comparison, and churn distribution visualization.

Deep dive into churn patterns by customer segments including tenure groups, internet service type, and payment methods.

Side-by-side comparison of machine learning model performance with metrics including accuracy, recall, F1 score, and ROC-AUC.

Interactive tool allowing users to input customer characteristics and instantly calculate churn probability based on the trained model.

Real-time churn probability result displayed after submitting customer details, enabling immediate risk assessment.
