GithubHelp home page GithubHelp logo

nisargfrd / ai_deeplearning_ann_mlp_tuned Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 2.79 MB

Using MLP (AI - ANN), identify products at risk of backorder before the event occurs so that business has time to react.

Jupyter Notebook 41.59% HTML 58.41%

ai_deeplearning_ann_mlp_tuned's Introduction

What is this repo about:

AI_DeepLearning_ANN_MLP_Tuned:

This repo contains Jupyter Notebook for solving below mentioned problem using Perceptron and MLP models of ANN.
I have created a function to automatically select the best model based on TPR. Furthmore, I have also tuned the Hyperparameters: Learning rate and Batch-Size. Best values for these hyperparameters will be automatically selected for the best model.

Preview the code:

http://htmlpreview.github.io/?https://github.com/nisargfrd/AI_DeepLearning_ANN_MLP_Tuned/blob/master/BackOrders_Predictions_ANN_MLP.html

Problem Statement:

Here we try to identify products at risk of backorder before the event occurs so that business has time to react.
I'll use Artificial Neural Networks (ANN) - Multi-layer Perceptron (MLP) model for the same.
I'll find the best of the ANN models from the trained ones. Also, I'll tune and use the best values for our Hyperparameters for the best model automatically.

What is a Backorder:

Backorders are products that are temporarily out of stock, but a customer is permitted to place an order against future inventory.
A backorder generally indicates that customer demand for a product or service exceeds a company’s capacity to supply it.
Back orders are both good and bad. Strong demand can drive back orders, but so can suboptimal planning.

Data:

Data file contains the historical data for the 8 weeks prior to the week we are trying to predict.
The data was taken as weekly snapshots at the start of each week. Columns are defined as follows:

sku - Random ID for the product
national_inv - Current inventory level for the part
lead_time - Transit time for product (if available)
in_transit_qty - Amount of product in transit from source
forecast_3_month - Forecast sales for the next 3 months
forecast_6_month - Forecast sales for the next 6 months
forecast_9_month - Forecast sales for the next 9 months
sales_1_month - Sales quantity for the prior 1 month time period
sales_3_month - Sales quantity for the prior 3 month time period
sales_6_month - Sales quantity for the prior 6 month time period
sales_9_month - Sales quantity for the prior 9 month time period
min_bank - Minimum recommend amount to stock
potential_issue - Source issue for part identified
pieces_past_due - Parts overdue from source
perf_6_month_avg - Source performance for prior 6 month period
perf_12_month_avg - Source performance for prior 12 month period
local_bo_qty - Amount of stock orders overdue
deck_risk - Part risk flag
oe_constraint - Part risk flag
ppap_risk - Part risk flag
stop_auto_buy - Part risk flag
rev_stop - Part risk flag
went_on_backorder - Product actually went on backorder. This is the target value.

Right Error Metrics:

Recall/ TPR
We'll use TPR.

Prerequisites:

Keras, Tensorflow (CPU and GPU for better performance), Graphviz needs to be installed on your machine to correctly execute the attached code/notebook and view the model plots.
I've used "use_multiprocessing=True" option while fitting the model in Keras, for better performance.
If your machine has low-end hardware, you can remove that option and then execute the code.

Happy Coding / AI Learning!

ai_deeplearning_ann_mlp_tuned's People

Contributors

nisargfrd avatar

Watchers

 avatar  avatar

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.