Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Custom-Churn-Prediction# Churn Prediction Using Deep Learning - First Attempt

📌 Project Overview

This is my first attempt at predicting customer churn using a Deep Learning model built with TensorFlow & Keras. The dataset used is Churn_Modelling.csv, and the goal is to classify whether a customer will exit (churn) or stay with the bank.

🎯 Key Highlights:

  • Built a Sequential Neural Network with TensorFlow/Keras
  • Achieved ~80% accuracy
  • Applied One-Hot Encoding & Feature Scaling
  • Used ReLU & Sigmoid activations
  • Trained for 100 epochs

📂 Dataset Information

The dataset consists of customer details, such as Geography, Gender, Credit Score, Balance, etc.

🔑 Features Used:

Feature Name Description
CreditScore Customer's credit score
Geography Country of residence
Gender Male/Female
Age Customer's age
Tenure Years of account ownership
Balance Account balance
NumOfProducts Number of bank products used
HasCrCard Whether the customer has a credit card
IsActiveMember Whether the customer is active
EstimatedSalary Estimated salary

🎯 Target Variable:

  • Exited (1 = Churn, 0 = No Churn)

🔨 Model Architecture

# Build the neural network
model = Sequential([
    Input(shape=(X_train.shape[1],)),
    Dense(3, activation='relu'),
    Dense(11, activation='relu'),
    Dense(1, activation='sigmoid')
])

Hyperparameters

  • Optimizer: Adam
  • Loss Function: Binary Crossentropy
  • Epochs: 100
  • Validation Split: 20%

📊 Results & Observations

  • Accuracy on Test Set: ~80%
  • Validation Accuracy fluctuated across epochs
  • The model could be further optimized by adjusting layers, neurons, and hyperparameters.

📉 Accuracy & Loss Curves:

loss_vs_val_loss accuracy_vs_val_acc


📌 Next Steps

Hyperparameter Tuning (Neurons, Layers, Regularization, Dropout) ✅ Reduce Overfitting (Better architecture) ✅ Increase Accuracy (Aim for 85-90%)


📜 Learning Takeaways

📌 Neural networks require careful tuning to improve performance. 📌 Feature scaling & encoding are crucial for better training. 📌 Churn prediction can benefit from additional feature engineering.


📎 Repository Structure

📂 Churn_Prediction_DL
├── 📄 Churn_Modelling.csv
├── 📄 churn_prediction.ipynb
├── 📄 requirements.txt
├── 📄 README.md  

📦 Installation & Requirements

To install dependencies, run:

pip install -r requirements.txt

requirements.txt

tensorflow
keras
numpy
pandas
matplotlib
scikit-learn

📌 Future Update (86% Accuracy Version) 🚀

I plan to improve this model with better hyperparameter tuning & architecture adjustments. Stay tuned for a follow-up post! 🎯

📌 Follow me on LinkedIn for updates! 😊

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages