Skip to content

eljandoubi/Predict-Customer-Churn-with-Clean-Code

Repository files navigation

Predict Customer Churn with Clean Code

Description

This project is about Clean Code Principles. The problem is to predict credit card customers that are most likely to churn using clean code best practices.

Prerequisites

Python and Jupyter Notebook are required. Also a Linux environment may be needed within windows through WSL.

Dependencies

  • sklearn
  • numpy
  • pandas
  • matplotlib
  • seaborn
  • pytest

Installation

Use the package manager conda to install the dependencies from the conda.yml

conda env create -f conda.yml

Usage

The main script to run using the following command.

python churn_library.py

which will generate

  • EDA plots in the directory ./images/EDA/
  • Model metrics plots in the directory ./images/results/
  • Saved model pickle files in the directory ./models/
  • A log file ./log/churn_library.log

The tests script can be used with the following command which will generate a log file ./churn_script_logging_and_tests.log

python churn_script_logging_and_tests.py

License

Distributed under the Apache License 2.0 License. See LICENSE for more information.