This project demonstrates the use of a feed-forward Artificial Neural Network (ANN) to predict customer churn using the IBM Telco Customer Churn dataset. It covers data preprocessing, feature engineering, model training, evaluation, and visualization, providing a complete workflow for churn prediction.
- Objective: Predict whether a customer will churn (binary classification).
- Target Variable:
Churn
column. - Approach:
- Encode categorical features and scale numerical features.
- Split dataset into training and test sets.
- Train a compact ANN using Keras/TensorFlow.
- Evaluate performance using accuracy, confusion matrix, and classification metrics.
prediction.ipynb
— main notebook containing the full workflow.WA_Fn-UseC_-Telco-Customer-Churn.csv
— dataset used.README.md
— project documentation.
- Source: IBM Telco Customer Churn dataset.
- Description: Includes demographic, service, and billing information of customers, with a
Churn
label indicating whether the customer left the service.
- Input Features: 26
- Layers:
Dense(26, activation='relu', input_shape=(26,)) Dense(1, activation='sigmoid')
-
Compilation:
- Optimizer:
adam
- Loss:
binary_crossentropy
- Metrics:
accuracy
- Optimizer:
-
Training: 100 epochs, validation split 0.2
- Categorical Encoding: One-hot encoding for features like
InternetService
,Contract
,PaymentMethod
. - Numerical Scaling: Min-Max scaling for
tenure
,MonthlyCharges
,TotalCharges
. - Train-Test Split: 80% training, 20% testing (
random_state=5
). - Input Shape: Ensured consistency with 26 features.
- Metrics Used: Accuracy, Confusion Matrix, Precision, Recall, F1-score.
- Performance: Validation accuracy typically ~0.80.
- Python 3.x
- Install dependencies:
pip install tensorflow scikit-learn pandas numpy matplotlib
- Install dependencies.
- Open
prediction.ipynb
in Jupyter Lab, Notebook, or VS Code. - Run all cells sequentially to reproduce preprocessing, training, and evaluation.
- Ensure
TotalCharges
is numeric before scaling. - Random seed (
random_state=5
) ensures reproducibility. - GPU recommended for faster model training.
- IBM Telco Customer Churn dataset
- TensorFlow/Keras and scikit-learn communities
I can also create a **matching `requirements.txt` and GitHub repo description** that complements this README professionally. Do you want me to do that?