-
This project is developed to predict the likelihood of churn for bank customers. The project has gone through various stages, including analyzing customer behaviors, making predictions with various models, and evaluating the performance of the model.
-
The insights obtained from the project contribute to providing valuable feedback to the bank, enabling it to improve and retain customers. By understanding various customer behaviors, the bank can make informed decisions to enhance its services and address any areas that may lead to customer churn.
The main objectives of the project are as follows:
- Analyze and visualize customer behaviors.
- Develop various models to predict the likelihood of customer churn.
- Use different methods to select the best model and optimize it.
- Monitor and evaluate the model's performance using Evident AI.
The main objectives of this project are as follows:
-
Analyze and Visualize Customer Behaviors:
- Utilized exploratory data analysis (EDA) techniques to gain insights into customer behaviors.
- Visualized key metrics using Matplotlib and other data visualization tools.
-
Develop Predictive Models:
- Built various machine learning models to predict the likelihood of customer churn.
- Explored classification and clustering models to capture different aspects of customer behavior.
-
Model Optimization:
- Employed different methods to select the best-performing model.
- Utilized hyperparameter tuning and grid search to optimize model performance.
-
Monitoring with Evident AI:
- Incorporated Evident AI for model monitoring and evaluation.
- Evaluated the model's performance over time and made necessary adjustments.
- Classification model(GBM,RandomForestClassifier,SVC..)
- Cluster model(KMeans)
Feature Importance:
- Identified key features influencing customer churn through feature importance analysis.
Segmentation Insights:
- Leveraged clustering models to gain insights into customer segmentation.
- Discovered patterns in customer behavior and preferences.
-
Python:
- The project is developed in Python, a language well-suited for data science projects due to its extensive library support and rapid prototyping capabilities.
-
Pandas:
- Pandas, used for data manipulation and analysis, played a crucial role in processing and preprocessing the dataset.
-
NumPy:
- NumPy, essential for numerical computations and data manipulation, facilitated various matrix operations and numerical tasks.
-
Scikit-Learn:
- Scikit-Learn was employed for developing, training, and evaluating machine learning models, including the Gradient Boosting Classifier.
-
Matplotlib and Seaborn:
- Matplotlib and Seaborn were used for data visualization, aiding in understanding and presenting the data during the exploratory data analysis (EDA) phase.
-
Streamlit:
- Streamlit was utilized to create a live web application. It provides a user-friendly interface for efficient and rapid development.Streamlit Website
-
Joblib:
- Joblib was chosen for saving and loading models, a crucial aspect for using the model in a live environment and managing deployment processes.
-
Evident AI:
- Evidently AI was employed to monitor and evaluate the model's performance continuously. This ensures ongoing assessment of the model's effectiveness in a live setting.I imported some monitoring metrics and dashboard using evidently ai with streeamlit shairng.(Evident ai has own cloud too)
-
Streamlit App (app.py):
- Deployed a Streamlit web application for live predictions.
- Streamlit documentation: Streamlit Documentation
-
Monitoring with Evident AI:
- Monitored and evaluated model performance using Evident AI.
- Evident AI documentation: Evident AI Documentation)
-
Classification and Clustering Models:
- Developed classification models to predict churn.
- Explored clustering models to understand customer segmentation.
-
Data Cleaning and Preprocessing:
- Cleaned and preprocessed the dataset to handle outliers and improve model accuracy.
app.py
: Streamlit web application for live predictions.evidentlyai_monitoring.ipynb
: Jupyter notebook for model monitoring using Evident AI.project.ipynb
: Jupyter notebook for classification models.project.ipynb
: Jupyter notebook for clustering models.gbm_production_model.joblib
: Save and use machine learning model.gbm_model_prediction.py
:Predict production model on your local.gbm.py
:Predict basic model to predict local with all features.project.pdf
:You can find main project with pdf format too.view.pdf
:My reports and my ideas eith pdf formatassets/html
:This files are exported by Evident AI.
- Clone the project repository to your computer:
git clone https://github.com/nursena8/BankCustomerProject.git
2.Install depndecies
pip install -r requirements.txt
- Run the streamlit app
streamlit run app.py
The following HTML files are required for the project to function properly:
assets/class_report.html
: This html created by evident ai show us classification reports.assets/report.html
: This html created by evidently library using Jpyter notebook shows us dataframe summary.assets/data_quality_report.html
:this html created by evidently using Jupyter notebook shows us dataset correlatio n.
[MY streamlit Website :)] (https://bankcustomerproject-4feyynfr99jzzpcegoeuq7.streamlit.app/)
To start the Streamlit application, follow these steps:
- Install the Streamlit application:
!pip install streamlit
- Run your streamlit project:
- streamlit run app.py
- Go your port that you defineded
-
I created app.py and run in my local.
-
linked with github and created a repo to linked and deploy app.
-Note: Don't give up Your app running on your local but deployment has some errors like version,packet downloads,moduleNotFound error.
- I created dockerfile.
- run
docker build -t my-streamlit-app .
- run
docker run -p 8501:8501 my-streamlit-ap
- http://localhost:8501
1.Install evidentlu !pip install evidently 2. Import evidently 3. Monitor model performance metrics and useful data dashboards
-
Continuous Improvement:
- Plan for continuous model improvement based on ongoing monitoring and feedback.
-
Additional Features:
- Explore the incorporation of new features for enhanced predictive power.
-
Advanced Models:
- Investigate the implementation of advanced machine learning models for further accuracy.
-
Feedback Mechanism:
- Establish a feedback mechanism for customers to provide insights into their preferences.
This project has MIT License
Nursena Baykir
Would you like to Ask me anything?
- Mail📫
Thank you for your consideration.