Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏦 Predicting Bank Customer Churn Using Machine Learning

πŸ“Œ Overview

This project analyzes bank customer churn using machine learning models. The goal is to predict whether a customer will leave the bank based on their demographic, financial, and behavioral data.

The dataset consists of 10,000 bank customers, with features such as:

  • Credit Score, Age, Balance, Number of Products, IsActiveMember, and more.

By applying Exploratory Data Analysis (EDA) and Supervised Machine Learning models, we aim to identify key factors that contribute to customer churn and build a predictive model.


🎯 Objectives

  • πŸ“Š Perform Exploratory Data Analysis (EDA) to find patterns in customer churn.
  • πŸ† Train and evaluate machine learning models to predict churn.
  • πŸ”Ž Identify key features that influence customer retention.
  • πŸš€ Optimize model performance for better accuracy.

πŸ“‚ Dataset

  • File Name: churn.csv
  • Rows: 10,000
  • Columns: 14
  • Target Variable: Exited (1 = Churned, 0 = Retained)

πŸ”‘ Key Features:

Feature Description
CreditScore Customer's credit score
Geography Country (France, Spain, Germany)
Gender Male or Female
Age Age of customer
Tenure Number of years with the bank
Balance Account balance
NumOfProducts Number of products customer has with the bank
HasCrCard Whether the customer has a credit card (1 = Yes, 0 = No)
IsActiveMember Whether the customer is active (1 = Yes, 0 = No)
EstimatedSalary Customer's estimated salary
Exited (Target Variable) 1 = Churned, 0 = Retained

πŸ” Exploratory Data Analysis (EDA)

  • βœ… Summary statistics & data distribution
  • πŸ“Š Visualizations (Histograms, Boxplots, Correlation heatmaps)
  • πŸ”Ž Feature importance analysis

βš™οΈ Machine Learning Models

We experiment with different classification models:

  1. Logistic Regression πŸ€–
  2. Random Forest Classifier 🌲
  3. Gradient Boosting (XGBoost, LightGBM) πŸš€
  4. Neural Networks (MLPClassifier) πŸ”₯

πŸ“Š Model Evaluation Metrics:

  • Accuracy
  • Precision & Recall
  • F1 Score
  • ROC-AUC Curve

πŸš€ Results & Key Insights

  • Feature Importance: The most influential factors in churn prediction were:
    • Age (Older customers churn more)
    • Number of Products (Customers with 1 product churn more)
    • IsActiveMember (Inactive members are more likely to leave)
    • Geography (Churn rate varies by country)

About

This project analyzes **bank customer churn** using **machine learning models**. The goal is to predict whether a customer will leave the bank based on their demographic, financial, and behavioral data.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages