sevvaliclal/BinaryClassificationwithaBankChurnDataset
0
Customer Churn Prediction
An end-to-end machine learning project for predicting customer churn using structured banking data. The project covers the full pipeline from data analysis to model deployment readiness.
๐ Project Overview
The goal of this project is to predict whether a customer will leave the bank (Exited = 1) based on demographic, financial, and behavioral features.
The main focus is:
- Robust feature engineering
- Model comparison using multiple algorithms
- ROC-AUCโbased evaluation for imbalanced data
- Cross-validation and hyperparameter tuning
- Saving the final model for inference and deployment
๐ Dataset
- Rows: 165,034
- Target:
Exited(binary classification) - No missing values
- Categorical features encoded
- Multiple engineered behavioral features added
โ๏ธ Feature Engineering
Key engineered features include:
- Balance usage indicator (
HasBalance) - Balance per product ratio
- Age and credit score segmentation
- Activity ร product interaction score
- Tenure and salary-based ratios
Identifier columns (id, CustomerId, Surname) were removed to avoid noise.
๐ค Models Trained
The following models were evaluated:
- Logistic Regression
- Decision Tree
- Random Forest
- Gradient Boosting
- AdaBoost
- LightGBM
- XGBoost
- CatBoost
All models were evaluated using ROC-AUC as the primary metric.
๐ Model Performance (ROC-AUC)
๐ Validation & Tuning
- Stratified K-Fold Cross Validation
- RandomizedSearchCV for hyperparameter tuning
- Class imbalance handled using class weights
- Final model trained with optimal hyperparameters
๐ Deployment
The trained model is saved and can be used for inference via:
- Streamlit
- Hugging Face Spaces
- Any Python-based backend
To run the Streamlit app locally:
streamlit run app.py