Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Customer Churn Prediction Using Machine Learning

📌 Project Overview

This project predicts customer churn for a bank using machine learning models.
The goal is to identify customers who are likely to leave so that the business can take proactive retention actions.


📊 Dataset

  • Source: Churn Modelling Dataset
  • Records: 10,000 customers
  • Features: Credit score, age, balance, tenure, salary, geography, etc.
  • Target: Exited (1 = churn, 0 = not churn)

🛠️ Tools & Technologies

  • Python
  • Pandas, NumPy
  • Matplotlib, Seaborn
  • Scikit-learn

🤖 Machine Learning Models Used

  • Random Forest Classifier (Best Model)
  • Logistic Regression
  • Support Vector Machine (SVM)
  • K-Nearest Neighbors (KNN)
  • Gradient Boosting

📈 Model Performance

Model Accuracy
Random Forest 86.5%
Gradient Boosting 86.7%
KNN 83%
Logistic Regression 81%
SVM 80%

🏆 Best Model

  • Random Forest Classifier
  • Accuracy: 86.5%
  • Precision (Churn): 0.75
  • Recall (Churn): 0.47

📊 Key Insights

  • Model performs better on non-churn customers
  • Struggles to detect churn cases (class imbalance issue)
  • Feature engineering improved model performance

⚠️ Limitations

  • Class imbalance affects recall
  • Some models underperform on minority class

🚀 Future Improvements

  • Apply SMOTE for imbalance handling
  • Use XGBoost / LightGBM
  • Hyperparameter tuning (GridSearchCV)
  • Adjust decision threshold for better recall

📂 Files in this Repository

  • churn_prediction.ipynb → Full analysis and model building
  • churn_prediction.html → Report version of notebook
  • Churn_Modelling.csv → Dataset

👨‍💻 Author

Sahel Ahmed

About

Customer churn prediction using machine learning models (Random Forest, Gradient Boosting, SVM, etc.)

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages