Skip to content

prathamesh693/Customer-Churn-Prediction-in-Telecom-Industry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

50 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“‰ Customer Churn Prediction in Telecom Industry

๐ŸŽฏ Machine Learning to Enhance Customer Retention

This project aims to predict customer churn in the telecom industry using machine learning models such as Decision Tree, XGBoost, and SVM. By identifying at-risk customers early, telecom companies can take proactive steps to retain them and reduce revenue loss. The end-to-end pipeline includes preprocessing, model building, evaluation, and deployment through a FastAPI.


๐Ÿ“š Table of Contents


๐Ÿ“Œ Problem Statement

Customer churn significantly impacts telecom business growth. Retaining existing customers is more cost-effective than acquiring new ones. This project aims to develop a churn prediction model using customer usage, demographics, and service data to enable personalized retention strategies.


๐ŸŽฏ Objective

  • Predict whether a customer is likely to churn using ML algorithms
  • Provide actionable insights into churn drivers
  • Deploy a user-friendly prediction tool using FastAPI

โš ๏ธ Challenges

  • Imbalanced dataset: Fewer churners vs. non-churners
  • Missing/inconsistent data in customer records
  • Selecting the most impactful features
  • Ensuring robust performance on unseen data
  • Providing explainability for business decision-making

๐Ÿ› ๏ธ Project Lifecycle

  1. Data Collection
    • Kaggleโ€™s Telco Customer Churn dataset
  2. Data Preprocessing
    • Handling nulls, encoding categoricals, scaling features
  3. Exploratory Data Analysis (EDA)
    • Visualizing churn rates by tenure, services, and demographics
  4. Model Building
    • Train Decision Tree, XGBoost, and SVM classifiers
  5. Model Evaluation
    • Accuracy, ROC-AUC, precision, recall, F1-score
  6. Model Deployment
    • FastAPI for churn prediction
  7. Monitoring & Maintenance
    • Model performance tracking and periodic updates

๐Ÿ“ File Description

  • Preprocessing.py โ€“ Prepares and cleans raw input data
  • Train_model.py โ€“ Trains models and saves best one
  • predict.py โ€“ Runs model inference on new/test data
  • API.py โ€“ Interactive API
  • eda.ipynb โ€“ Exploratory data analysis notebook
  • modeling.ipynb โ€“ Model training and comparison notebook
  • evaluation.ipynb โ€“ Evaluation metrics and visualizations

โš™๏ธUsage

  1. Prepare your train-data.csv and test-data.csv.
  2. Run preprocessing:
    python Preprocessing.py
  3. Train model:
    python Train_model.py
  4. Predict churn on test data:
    python predict.py
  5. Run API:
    uvicorn main:app --reload

๐Ÿ’ป Tools and Technologies


Success Criteria

  • Achieve high classification accuracy and ROC-AUC score on test data.
  • Demonstrate the modelโ€™s ability to generalize well to unseen data.
  • Provide actionable insights into churn drivers via EDA and feature importance.
  • Deliver an easy-to-use Streamlit app for business users to predict churn on new data.
  • Maintain reproducibility and code modularity for future enhancements.

๐Ÿ”— References (๐Ÿ“ŠDataset)

Download from Kaggle Telco Customer Churn


๐Ÿค Connect With Me

LinkedIn GitHub

About

๐Ÿ” Predict customer churn in the telecom industry using machine learning models like Decision Tree, XGBoost, and SVM. Includes data preprocessing, model training, evaluation, and a FastAPI app for interactive predictions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors