Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📞 Telecom Customer Churn Prediction

End-to-End Machine Learning Project with Streamlit Deployment


📌 Overview

Customer churn is one of the biggest challenges faced by telecom companies. Retaining existing customers is significantly more cost-effective than acquiring new ones.

This project predicts whether a telecom customer is likely to Stay or Churn using Machine Learning.

The project covers the complete Machine Learning lifecycle including:

  • Data Cleaning
  • Exploratory Data Analysis
  • Feature Engineering
  • Model Training
  • Model Evaluation
  • Streamlit Deployment
  • Business Recommendation System
  • Prediction Report Generation

📂 Dataset

Dataset: IBM Telco Customer Churn Dataset

The dataset contains customer information such as:

  • Gender
  • Senior Citizen
  • Internet Service
  • Contract Type
  • Monthly Charges
  • Total Charges
  • Payment Method
  • Online Security
  • Streaming Services

Target Variable:

Churn

🚀 Features

✔ Data Cleaning

✔ Exploratory Data Analysis

✔ Feature Engineering

✔ Missing Value Handling

✔ One-Hot Encoding

✔ Feature Scaling

✔ Multiple Machine Learning Models

✔ Hyperparameter Tuning

✔ Customer Churn Prediction

✔ Prediction Probability

✔ Business Recommendations

✔ Feature Importance Visualization

✔ Download Prediction Report

✔ Interactive Streamlit Dashboard


🛠 Tech Stack

Category Technology
Language Python
Data Analysis Pandas, NumPy
Visualization Matplotlib, Seaborn
Machine Learning Scikit-Learn
Model Saving Joblib
Web Framework Streamlit
IDE VS Code

📁 Project Structure

Telecom-Customer-Churn-Prediction/

│
├── models/
│ ├── best_model.pkl
│ ├── scaler.pkl
│ ├── model_columns.pkl
│ └── target_encoder.pkl
│
├── notebooks/
│ ├── EDA.ipynb
│ ├── Preprocessing.ipynb
│ ├── Model_Training.ipynb
│ └── Model_Evaluation.ipynb
│
├── outputs/
│ ├── churn_distribution.png
│ ├── feature_importance.png
│ ├── confusion_matrix.png
│ ├── ROC_curve.png
│ └── ...
│
├── src/
│ ├── load_data.py
│ ├── preprocess.py
│ ├── train_model.py
│ ├── evaluate.py
│ └── predict.py
│
├── streamlit_app/
│ └── app.py
│
├── reports/
│
├── requirements.txt
│
└── README.md

⚙ Machine Learning Workflow

Dataset

↓

Data Cleaning

↓

EDA

↓

Preprocessing

↓

Encoding

↓

Scaling

↓

Train/Test Split

↓

Model Training

↓

Model Evaluation

↓

Model Selection

↓

Save Model

↓

Streamlit Deployment

📊 Model Performance

Metric Score
Accuracy 80%+
Precision High
Recall High
F1 Score High

💻 Streamlit Dashboard

The application allows users to:

  • Enter customer details
  • Predict churn probability
  • View Stay vs Churn percentages
  • Get business recommendations
  • View important features
  • Download prediction report

📸 Screenshots

🏠 Home Page

Home


📝 Customer Input

Input Form


📊 Prediction Result

Prediction


💼 Business Recommendation

Business Recommendation


📈 Feature Importance

Feature Importance

▶ Installation

Clone the repository

git clone https://github.com/HarshitKumarModi/Telecom-Customer-Churn-Prediction.git

Go inside project

cd Telecom-Customer-Churn-Prediction

Install dependencies

pip install -r requirements.txt

Run Streamlit

streamlit run streamlit_app/app.py

📈 Future Improvements

  • Deep Learning Models
  • XGBoost Integration
  • Explainable AI (SHAP)
  • Docker Deployment
  • Cloud Deployment
  • Customer Lifetime Value Prediction

👨‍💻 Author

Harshit Kumar Modi

B.Tech Computer Science Engineering

VIT Bhopal University

GitHub: https://github.com/HarshitKumarModi

LinkedIn: https://linkedin.com/in/harshitkumarmodi


⭐ If you like this project, don't forget to Star the repository.

About

End-to-End Machine Learning Project for Telecom Customer Churn Prediction using Streamlit

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages