Update README.md
Browse files# 💰 Bank Churn Prediction — AI for Smarter Customer Retention
## 🧩 Overview
Businesses like banks which provide service have to worry about the problem of *Customer Churn*, i.e. customers leaving and joining another service provider. It is important to understand which aspects of the service influence a customer's decision in this regard. Management can concentrate efforts on improvement of service, keeping in mind these priorities.
**Objective**
You as a Data Scientist with the bank need to build a neural network–based classifier that can determine whether a customer will leave the bank or not in the next 6 months.
---
## 🤖 Model Details
- **Model Type:** Feed-forward ANN (Artificial Neural Network) — Binary Classifier
- **Framework:** TensorFlow / Keras
- **Dataset:** Bank Customer Churn Dataset (10,000+ customers)
- **Input:** Structured customer profile (credit score, age, balance, tenure, activity, salary, etc.)
- **Output:** Binary churn prediction (`0 = stays`, `1 = churn`)
---
## 📊 Data Dictionary
| Feature | Description |
|---------------------|------------------------------------------------------------------------------|
| `CustomerId` | Unique ID assigned to each customer |
| `Surname` | Customer’s last name |
| `CreditScore` | Customer credit history |
| `Geography` | Customer location |
| `Gender` | Gender of the customer |
| `Age` | Age of the customer |
| `Tenure` | Number of years with the bank |
| `NumOfProducts` | Number of bank products purchased |
| `Balance` | Account balance |
| `HasCrCard` | Whether the customer has a credit card |
| `EstimatedSalary` | Estimated salary |
| `IsActiveMember` | Whether the customer is an active member |
| `Exited` | Target label — 0: No (customer stays), 1: Yes (customer churns) |
---
## 🌟 Why It Matters
✅ Detects early signs of potential churn
✅ Enables targeted retention strategies
✅ Improves customer engagement and loyalty
✅ Helps maximize profitability and reduce attrition rates
📘 **Full Source Notebook:**
The complete training and evaluation notebook is available on GitHub:
👉 [View on GitHub](https://github.com/joyjitroy/Machine_Learning/blob/main/Bank_Customer_Churn_Prediction_using_Artificial_Neural_Networks.ipynb)
---
## 🚀 Example Usage
```python
from tensorflow.keras.models import load_model
import numpy as np
# Load trained model
model = load_model("bank_churn_model.h5")
# Example customer record (normalized)
# [CreditScore, Age, Tenure, Balance, NumOfProducts, HasCrCard, IsActiveMember, EstimatedSalary, Geography_Germany, Geography_Spain, Gender_Male]
sample = np.array([[600, 40, 3, 60000, 2, 1, 1, 50000, 0, 1, 1]])
# Get churn probability
pred = model.predict(sample)
print("Churn Probability:", pred[0][0])
if pred[0][0] > 0.5:
print("Prediction: Customer likely to churn")
else:
print("Prediction: Customer likely to stay")