Customer churn is a critical issue for banks, as retaining customers is more cost-effective than acquiring new ones. This project aims to analyze customer churn in a bank and develop a predictive model to identify customers who are likely to leave. By understanding the factors influencing churn, the bank can implement targeted strategies to retain customers and improve their experience.
- Introduction
- Dataset
- Data Preprocessing
- Exploratory Data Analysis (EDA)
- Modeling
- Evaluation
- Results
- Conclusion
- Usage
- Contributing
- License
Customer churn refers to the phenomenon where customers stop using a company's products or services. In the banking sector, understanding and predicting churn is essential for customer retention. This project involves analyzing bank customer data, building predictive models, and providing actionable insights to reduce churn rates.
The dataset used for this project contains information about bank customers, including their demographics, account information, and transaction history. Key features include:
- CustomerID
- Surname
- CreditScore
- Geography
- Gender
- Age
- Tenure
- Balance
- NumOfProducts
- HasCrCard
- IsActiveMember
- EstimatedSalary
- Exited (target variable indicating churn)
Data preprocessing steps include:
- Handling missing values
- Encoding categorical variables
- Scaling numerical features
- Splitting the data into training and testing sets
EDA involves visualizing and analyzing the dataset to uncover patterns and relationships between features. Key steps include:
- Distribution analysis of numerical and categorical features
- Correlation analysis
- Identifying significant features impacting churn
Various machine learning models are implemented to predict customer churn:
- Logistic Regression
- Decision Tree
- Random Forest
- Gradient Boosting
- Support Vector Machine (SVM)
- Neural Networks
Models are evaluated using metrics such as:
- Accuracy
- Precision
- Recall
- F1 Score
- ROC-AUC Curve
The results section summarizes the performance of each model and identifies the best-performing model. Feature importance analysis is also conducted to understand the key drivers of customer churn.
The conclusion highlights the key findings from the analysis and provides recommendations for the bank to reduce customer churn. This may include targeted marketing strategies, personalized customer service, and product improvements.
To use this project, follow these steps:
- Clone the repository:
git clone https://github.com/oladimeji-kazeem/bank-customer-churn.git