A machine learning application for predicting customer churn using 15 different algorithms and advanced feature engineering.
- 15 machine learning models including XGBoost, LightGBM, CatBoost
- Advanced feature engineering with 15 new features
- Class imbalance handling using SMOTE-Tomek
- Hyperparameter optimization via GridSearchCV
- Interactive prediction interface
- Comprehensive model performance analysis
- Real-time churn predictions
- Python 3.9
- Scikit-Learn
- XGBoost, LightGBM, CatBoost
- Streamlit
- Pandas, NumPy
- Imbalanced-Learn
- Source: Kaggle Bank Customer Churn Dataset
- 10,000 customer records
- 26 features (11 original + 15 engineered)
- Binary target variable (Churn / Not Churn)
- Class imbalance ratio of 4:1
Best performing model (Voting Ensemble) achieves:
| Metric | Value |
|---|---|
| Accuracy | 85.93% |
| Precision | 70.77% |
| Recall | 52.70% |
| F1-Score | 0.60 |
| ROC-AUC | 0.87 |
| Matthews Correlation Coefficient | 0.53 |
| Cohen's Kappa | 0.52 |
- Logistic Regression
- Decision Tree Classifier
- Random Forest Classifier
- Gradient Boosting Classifier
- Support Vector Machine
- K-Nearest Neighbors
- Gaussian Naive Bayes
- AdaBoost Classifier
- Extra Trees Classifier
- Linear Discriminant Analysis
- Quadratic Discriminant Analysis
- XGBoost
- LightGBM
- CatBoost
- Voting Ensemble
churn-prediction/
├── .streamlit/
│ └── config.toml
├── app.py
├── customer_churn_prediction_enhanced.py
├── churn.csv
├── requirements.txt
├── README.md
├── .gitignore
├── best_model.pkl
├── scaler.pkl
├── label_encoders.pkl
├── model_comparison_results.csv
├── model_results_summary.txt
├── eda_comprehensive_analysis.png
├── model_evaluation_comprehensive.png
└── roc_curves_top_models.png
- Home - Project overview and key performance metrics
- Model Performance - Detailed model comparison and evaluation charts
- Make Prediction - Real-time churn prediction for individual customers
- Exploratory Analysis - Interactive dataset exploration with filters
- About - Detailed project and methodology information
pip install -r requirements.txt
streamlit run app.py- GitHub: @manjot7
- LinkedIn: LinkedIn Profile
This project is open source and available under the MIT License.