This project aims to predict customer churn in a telecom company using machine learning techniques. Customer churn, also known as customer attrition, refers to the phenomenon where customers cease doing business with a company. Predicting churn is crucial for businesses as it allows them to take proactive steps to retain customers.
- Overview
- Project Overview
- Dataset
- Features
- Usage
- Dependencies
- Installation
- Data Preprocessing
- Model Building
- Evaluation
- Deployment
- Contributing
- License
In this project, we utilize machine learning techniques to build a predictive model for customer churn. The model is trained on historical data that includes information about telecom customers and whether they churned or not.
- Problem Statement: Predict telecom customer churn using machine learning.
- Technologies Used: Python, scikit-learn, pandas, Flask (for deployment).
- Model: We trained and evaluated multiple machine learning models (e.g., logistic regression, random forest, XGBoost) and selected the best-performing one.
- Evaluation Metrics: We used accuracy, precision, recall, F1-score, and ROC-AUC to assess model performance.
- We used the Telecom Customer Churn dataset for this project. This dataset contains information about customer demographics, usage patterns, and whether they churned or not.
To use this project, follow these steps:
- Clone the repository to your local machine.
- Install the required dependencies (see Dependencies).
- Follow the Installation instructions.
- Train the model using Model Training instructions.
- Evaluate the model using Evaluation instructions.
- Clone the repository:
git clone https://github.com/your-username/telecom-churn-prediction.git
- Navigate to the project directory:
cd Customer-Churn`
- Create virtual environment
python3 -m venv venv
- Activate Virtual Environment
source venv/bin/activate
- Install the required dependencies:
pip install -r requirements.txt
- Clone the repository:
git clone https://github.com/your-username/telecom-churn-prediction.git
- Navigate to the project directory:
cd Customer-Churn`
- Create virtual environment
python -m venv venv
- Activate Virtual Environment
venv\Scripts\activate
- Install the required dependencies:
pip install -r requirements.txt
- Python 3.7+
- scikit-learn
- pandas
- Flask
- numpy
- matplotlib
- seaborn
- plotly
- Exploratory Data Analysis (EDA): We performed data visualization and analysis to gain insights into the dataset.
- Data Cleaning: Handled missing values, outliers, and duplicate records.
- Feature Engineering: Created new features and transformed existing ones.
- Data Encoding: Encoded categorical variables and scaled numerical features.
- We trained several machine learning models, including logistic regression, random forest, and XGBoost.
- Used cross-validation for hyperparameter tuning and model selection.
- Saved the best-performing model for deployment.
- Evaluated model performance using various metrics, including accuracy, precision, recall, F1-score, and ROC-AUC.
- Created visualizations to showcase results.
- Compared the model's performance against a baseline.
- Deployed the best model using a Flask web application.
- Created an API endpoint for making predictions.
- Hosted the application on a cloud server (e.g., Heroku).
Contributions to this project are welcome. To contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Create a pull request.
This project is licensed under the MIT License.