Skip to content

Latest commit

 

History

History
103 lines (65 loc) · 4.32 KB

README.md

File metadata and controls

103 lines (65 loc) · 4.32 KB

Clothes Demand Prediction

  • Predicting the demand of Clothes using LSTM and 3-layer neural network.
  • To run the given codes, install Keras with tensorflow backend in your IPython shell (preferably Anaconda).

Business Problem

  • Predicting the demand of various Clothing types in order to avoid inventory wastage.
  • No input is at disposal, hence the input variables need to be forecasted and then the target variable is regressed through the forecasted input variable

Data Definition and Understanding

  • Input variables
  1. AvgSP - Average Selling Price of SKU
  2. OP - Average Selling Price of various clothes
  3. CustomerCount - Total GT Customers for the given SKU ( = CustomerCount + Missed Customers)
  • Target Variable - ActualDemand of SKU ( = Ordered Quantity + Missed Demand)

  • Summary Stats

input_var_summ

ouput_var_summ

Training and Test Datasets

  • The last week of the complete dataset is considered for testing while the rest of the dataset is considered for training

Function to create Data Input to model

  • AvgSP
  1. @AvgSP is predicted using time series forecasting.
  2. Long Short-Term Memory (Recurrent Neural Network) method is used for forecasting. The forecasting problem is now considered as a supervised learning problem where the input is the value prior to the target day.
  3. LSTM is a special type of Neural Network which remembers information across long sequences to facilitate the forecasting.
  4. Forecasting results

avgsp_pred_cucum

  • CustomerCount
  1. @CustomerCount is predicted using the same method as @AvgSP
  2. Forecasting Results

cc_pred_cucum

Data Modelling

Model Name

  • 3-layer Neural Network using Keras Library (tensorflow backend)
  • The network is made up of 3 layers:
  1. Input layer
  • Takes input variables and converts them into input equation
  • Parameters: no. of neurons (memory blocks) = 16, activation function = linear, weight initializer = normal distribution, kernel and activity regularizer = L1 (alpha = 0.1)
  1. Hidden Layer
  • The processing (optimization) takes place in this layer.
  • Parameters: no. of neurons = 8, activation function = linear, weight initializer = normal distribution, kernel and activity regularizer = L1 (alpha = 0.1)
  1. Output Layer
  • Converts the processed results into a reverse scaled output.

Model Performance

train_dem_carr

dem_pred_carr

carr_dem_fore