This project implements an Artificial Neural Network (ANN) to predict whether a bank customer is likely to leave (churn) based on various demographic and financial factors.
The model is built using Keras/TensorFlow and follows a standard deep learning workflow:
- Data Loading: Importing the Churn Modeling dataset.
- Preprocessing: Separating features and target, followed by Standard Scaling to normalize input data.
- Architecture: A Sequential model with three hidden layers and a Sigmoid output for binary classification.
- Evaluation: Monitoring accuracy on both training and test sets to check for overfitting.
- Persistence: Saving the trained model and the scaler for future inference.
The neural network is structured as follows:
- Input Layer: 8 input features.
- Hidden Layer 1: 6 neurons, ReLU activation.
- Hidden Layer 2: 4 neurons, ReLU activation.
- Hidden Layer 3: 2 neurons, ReLU activation.
- Output Layer: 1 neuron, Sigmoid activation (for probability output).
- Optimizer: Adam
- Loss Function: Binary Crossentropy
- Batch Size: 100
- Epochs: 50
Ensure you have the following Python packages installed:
pip install pandas tensorflow scikit-learn