![Screenshot 2023-06-27 at 9 51 06 AM](https://private-user-images.githubusercontent.com/33859675/249097404-aebb2d8b-b78b-4bbe-8322-e005ed3132ec.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI3NjQ3MzMsIm5iZiI6MTcyMjc2NDQzMywicGF0aCI6Ii8zMzg1OTY3NS8yNDkwOTc0MDQtYWViYjJkOGItYjc4Yi00YmJlLTgzMjItZTAwNWVkMzEzMmVjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA0VDA5NDAzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYzYWZjOThhZGY1YzZmOTVlMTA3Y2UzOTVjMGE1ZWJmZGUxM2JmZDYwYWE2MzE3M2QyY2YxNWI3ZWJlMDcwNjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.tThV_qq1vSID1VD4TpKYiJdNvwE9lR45QcKtkMJneFs)
- Project Overview
- Data Source
- Website Link
- Implementation Details
- Steps Followed
- Results and Evaluation Criterion
- Future Improvements
This project aims to develop a machine learning model to predict bank customer churn. Customer churn, also known as customer attrition, refers to the phenomenon where customers stop doing business with a company or switch to a competitor. By identifying potential churners in advance, banks can take proactive measures to retain valuable customers and minimize revenue loss. This repository provides a comprehensive solution for predicting customer churn using various machine learning algorithms.
The dataset used for this project can be obtained from here.
It contains relevant customer information such as demographics, account activity and churn status.
A web-based demonstration of this project can be accessed here.
- Machine Learning
- Data Visualization
- Exploratory Data Analysis
- Predictive Modeling
- Python
- Jupyter
- streamlit
- Data Manipulation: Pandas, numpy
- Data Visualization: seaborn, matplotlib
- Data Preprocessing: imblearn
- Machine Learning: scikit, xgboost
- Data collection: Obtained the customer churn dataset from Source Dataset Link.
- Exploratory Data Analysis (EDA): Performed the comprehensive exploratory analysis to gain insights into the dataset, identify patterns, correlations, and potential predictive features.
- Data Preprocessing: Cleansed the data, handled categorical values, normalized the data, and addressed imbalanced data.
- Model Development: Implemented and trained various machine learning algorithms such as logistic regression, decision trees, random forests, and XGB.
- Model Evaluation: Assessed the performance of each model using metrics such as accuracy, precision, recall, F1-score. Selected the best-performing model for deploymet.
- Deployment: Deployed the chosen churn prediction model as a standalone application to enable real-time predictions for new customer data.
Based on the evaluation results, the best-performing model was XGBoost which achieved an accuracy of 91% and F1-score of 91%.
![Screenshot 2023-06-27 at 4 15 32 PM](https://private-user-images.githubusercontent.com/33859675/249125837-4d273530-aa25-443c-93d6-33d6d3904de4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI3NjQ3MzMsIm5iZiI6MTcyMjc2NDQzMywicGF0aCI6Ii8zMzg1OTY3NS8yNDkxMjU4MzctNGQyNzM1MzAtYWEyNS00NDNjLTkzZDYtMzNkNmQzOTA0ZGU0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA0VDA5NDAzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThiYTg0MDExZGJmNTRhNjg0OTM1YjJkMGU2ZGQwNzMwMWYyMGM3MjJmNmFiMTExZGMzYmI2ZGQwMTQ4Y2M2ODAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.wionOR7_BReo_0Ft0X4wODKveJUi1YhAfCCfzPCViP8)
Here are some potential areas for future improvements in the project:
- Feature engineering: Explore additional features that may capture customer behavior more accurately.
- Model optimization: Fine-tune the model parameters to potentially improve performance.
- Real-time monitoring: Implement a system to monitor and retrain the model periodically to adapt to changing customer dynamics.
- User interface enhancement: Improve the user interface of the deployed application for better user experience.