- Project Overview
- Files in the Project
- Directory Structure
- Installation and Setup
- Usage
- Key Features
- Data
- Model Performance
- Future Improvements
- License
- Contact
This project focuses on analyzing and predicting customer churn
for a telecommunications company. It includes exploratory data analysis (EDA)
, model building
, and a web application
for making predictions.
Churn_Analysis_EDA.ipynb
: Jupyter notebook containing exploratory data analysis.Churn_Analysis_Model_Building.ipynb
: Jupyter notebook for building and evaluating machine learning models.app.py
: Flask application for deploying the model as a web service.requirements.txt
: List of Python dependencies for the project.
data/
: Contains input data files.exports/
: Stores output files (CSV files and model files) generated during the analysis.
To run this project, you'll need Python 3.x and the required libraries. You can install the dependencies using the following command:
pip install -r requirements.txt
This will install the following libraries:
numpy
pandas
seaborn
matplotlib
scikit-learn
imbalanced-learn
flask
-
Exploratory Data Analysis:
- Open and run
Churn_Analysis_EDA.ipynb
in a Jupyter environment. - This notebook processes the data, performs
univariate
andbivariate analysis
, and exports the processed data to theexports/
directory.
- Open and run
-
Model Building:
- Open and run
Churn_Analysis_Model_Building.ipynb
in a Jupyter environment. - This notebook builds various models including
Decision Tree
andRandom Forest classifiers
, appliesSMOTEENN
for handling imbalanced data, and saves the best model to theexports/
directory.
- Open and run
-
Web Application:
-
Run
app.py
to start the Flask server:python app.py
-
Access the web interface through your browser to input customer data and get churn predictions.
-
-
Exploratory Data Analysis:
- Open and run
Churn_Analysis_EDA.ipynb
in a Jupyter environment. - This notebook processes the data, performs univariate and bivariate analysis, and exports the processed data to the
exports/
directory.
- Open and run
-
Model Building:
- Open and run
Churn_Analysis_Model_Building.ipynb
in a Jupyter environment. - This notebook builds various models including Decision Tree and Random Forest classifiers, applies SMOTEENN for handling imbalanced data, and saves the best model to the
exports/
directory.
- Open and run
-
Web Application:
- Run
app.py
to start the Flask server:python app.py
- Access the web interface through your browser to input customer data and get churn predictions.
- Run
- Comprehensive EDA with visualizations
- Machine learning models for churn prediction
- Handling of imbalanced dataset using SMOTEENN
- Web application for real-time predictions
The project uses the Telco Customer Churn dataset. Ensure you have the following files in your data
directory:
Telco-Customer-Churn.csv
first_telc.csv
The final model uses a Random Forest Classifier with SMOTEENN, achieving high accuracy and balanced performance across classes. The model file is saved in the exports/
directory.
- Implement more advanced models (e.g., XGBoost, Neural Networks)
- Enhancing the web application with more features and better UI
- Incorporate more recent data for improved predictions
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries or issues, please contact the project maintainers at [ssnfs26@gmail.com].