Git Product home page Git Product logo

mlops-predict-churn-clean-code's Introduction

Predict Customer Churn with Clean Code

This project is part of the ML DevOps Engineer Nanodegree program from Udacity. I developed a model to identify credit card customers that are most likely to churn, following coding (PEP8) and engineering best practices for implementing software (modular, documented, and tested) and the package also have the flexibility of being run interactively or from the command-line interface (CLI).

Install

To set up your environment to run the code in this repository, start by installing Docker in your machine. Then, start Docker Desktop and run.

$ make docker-build

Run

In a terminal or command window, navigate to the top-level project directory mlops-predict-churn-clean-code/ (that contains this README) and run the following command.

$ make tests

It will generate EDA plots in the images/eda/ folder, store some results also as images in the images/results/ directory, save the models trained in models/, and write the test logs in logs/churn_library.log file.

License

The contents of this repository are covered under the MIT License.

mlops-predict-churn-clean-code's People

Contributors

ucaiado avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mlops-predict-churn-clean-code's Issues

Save Images & Models

Store result plots including at least one:

  • EDA: Univariate, quantitative plot
  • EDA: Univariate, categorical plot
  • EDA: Bivariate plot
  • Model: Store at least two models. Recommended using joblib and storing models with .pkl extension.

Handle categorical columns

Use one-hot encoding or mean of the response to fill in categorical columns. Currently, the notebook does this in an inefficient way that can be refactored by looping. Make this code more efficient using the same method as in the notebook or using one-hot encoding. Tip: Creating a list of categorical column names can help with looping through these items and create an easier way to extend this logic

Implement logs for each function

Each function in churn_script_logging_and_tests.py is complete with logging for if the function successfully passes the tests or errors. It also should:

  • All log information should be stored in a .log file, so it can be viewed post the run of the script.
  • The log messages should easily be understood and traceable that appear in the .log file.
  • The README should inform a user how they would test and log the result of each function. (?)

Ensure code quality

To complete:

  • The code is following the PEP 8 coding style
  • The README file provides an overview of the project, the instructions to use the code
  • All functions and files have document string

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.