- Project Predict Customer Churn in ML DevOps Engineer Nanodegree program by Udacity.
Customer attrition, also known as customer churn, is the loss of clients or customers. Businesses measure and track churn as a percentage of lost customers compared to total number of customers over a given time period. Identifying and handling the customers about to churn can improve overall outcomes of the business.
This project seeks to answer the customer churn that is happening in the banking industry using clean code principles
The project is divided into the following sections:
- Import Data
- Exploratory data analysis and visualizations
- Feature engineering to transform data
- Building Models and evaulating performance
There are two components in this project:
File churn_library.py:
- Loads the
bank_data
dataset - Performs EDA and Visualizations
- Feature Engineering
- Model and Evaluation
File churn_script_logging_and_testing.py:
- Tests churn library
- Logs activity
List of libraries used for this project:
autopep8==1.5.7
joblib==0.11
matplotlib==2.1.0
numpy==1.12.1
pandas==0.23.3
pylint==2.9.6
scikit-learn==0.22
seaborn==0.8.1
Use the package manager pip to install the dependencies from the requirements.txt
pip install -r requirements.txt
Run the following command to execute the main script
python churn_library.py
script execution generates
- EDA plots are available in directory
./images/eda/
- Model metrics are available in directory
./images/results/
- Model pickle files are available in directory
./models/
- Log files are available in directory
./logs/results.log
Run the following command to run the tests script
python churn_script_logging_and_tests.py
script execution generates
- Log file
./logs/results.log
Distributed under the MIT License. See LICENSE
for more information.