Skip to content

ItsTSH/Customer-Churn-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📉 Customer Churn Prediction Project

🚀 Overview

This machine learning project predicts customer churn using advanced data analysis and predictive modeling techniques. Deployed as an interactive web application using Streamlit, the project provides actionable insights into customer retention strategies.

📋 Table of Contents

🌟 Project Description

Customer churn is a critical business challenge. This project offers:

Feature Description
🔮 Churn Prediction Machine learning model to forecast customer attrition
📊 Interactive Dashboard Streamlit web app for real-time predictions
🕵️ Insights Generation Detailed analysis of churn factors

🛠 Tech Stack

  • Python
  • Pandas
  • Numpy
  • Matplotlib
  • Plotly
  • Scikit-learn
  • Streamlit
  • TensorFlow

💻 Installation

🔧 Prerequisites

  • Python 3.8+
  • pip

📦 Setup

  1. Clone the Repository:
git clone https://github.com/ItsTSH/Customer-Churn-Prediction
  1. Create Virtual Environment (optional but recommended):
python -m venv venv
source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  1. Install Dependencies:
pip install -r requirements.txt

🚀 Deployment

Streamlit App

# Run the Streamlit app
streamlit run app.py

🗃️ Data

📊 Dataset

  • Source: Kaggle
  • Features:
    • Customer demographics
    • Usage patterns
    • Service interactions
  • Target Variable: Churn (Yes/No), Risk of Churn

🤖 Model

🧠 Machine Learning Algorithm(s)

  • Random Forest Classifier (For Feature Importance Analysis)
  • XGBoost Regressor (For Predictions)

📏 Evaluation Metrics

  • Mean Squared Error (MSE)
  • Root Mean Squared Error (RMSE)
  • Mean Absolute Error (MAE)
  • R² Score

🔍 Usage

📱 Streamlit Application

  1. Perform Data Analysis on the Dashboard Page
  2. View Model Predictions in the Predictions Page
  3. Receive churn prediction and insights

💻 Local Development

# Train the model
python ./model/Customer_Churn_Prediction.py

# Run predictions
python ./model/Customer_Churn_Prediction.py --input ./dataset/dataset.csv

📊 Project Results

  • Evaluation Metrics (XGBoost Regression Model):
  1. Mean Squared Error (MSE): 0.0450
  2. Root Mean Squared Error (RMSE): 0.2120
  3. Mean Absolute Error (MAE): 0.1292
  4. R² Score: 0.8168

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/AmazingFeature
  3. Commit your changes
    git commit -m 'Add some AmazingFeature'
  4. Push to the branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

📜 License

Distributed under the MIT License. See LICENSE for more information.

📞 Contact


⭐ If you find this project helpful, please consider starring the repository! 🌟

About

Customer Churn Prediction System using XGBoost Regressor, built on Telecom Industry dataset

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 4

  •  
  •  
  •  
  •