Application of Predictive Analytics in Volume Forecasting and Resource Planning
Application of Predictive Analytics in Volume Forecasting and Resource Planning
Predictive Analytics in
Volume Forecasting
and Resource Planning
1.
Introduction
About the Project, and
the approach taken.
2
Project Objective:
Project Approach:
▶ Identifying demand projection models that can be used for the task.
▶ Selecting models that can be deployed within the company’s
environment. The tools used will be based on R.
▶ Making sure that the demand prediction models and tools selected
can incorporate restrictions specific to the business case of the bank
and trade services operations.
▶ Taking historical data and testing it with selected models to identify
the one that gives the best results.
3
2.
The Problem
Understanding the problem, and
the Possible Solutions.
4
Defining the Problem:
6
3.
Forecasting Models
An Overview of the selected Models
7
The Models and Tools that we will be
looking at for our problem are as follows:
8
A Brief Overview of each of the selected
Models/Tools:
1. TBATS (Trigonometric, Box-Cox Transform, ARMA errors, Trend
and Seasonal Components):
4. H2O AutoML
12
4.
Data, and
Training Method
A look at the sample data being
used, and how the training is done.
13
Sample Dataset
Time Series Training and Validation
15
5.
Assessing the
Performance of
Selected Models
Selecting the right tools to
compare our models
16
Assessing the Performance of
Selected Models
For comparing the fit obtained from the various models,
going line by line, looking at each prediction will not give a true
picture.
Therefore, it is important to select a parameter on which to
assess the various models.
For our purpose, we will be using two parameters:
1. MAE ( Mean Absolute Error )
2. RMSE ( Root Mean Square Error )
Of these two, RMSE will be given precedence. The reason
for this has been discussed in the subsequent slides.
17
MAE ( Mean Absolute Error )
18
RMSE ( Root Mean Square Error )
-------------------------------------------------------------------------------------------
19
Comparing RMSE and MAE
20
Comparing RMSE and MAE
21
6.
TBATS
22
TBATS Model Fit (2013-2016) and Forecast (2017)
23
TBATS Forecast 2017 (looking at 3 month Windows)
24
Above: TBATS is able to keep up with Trend (Yellow) and Yearly
Seasonality (Black)
Below: Though it tracks the trend (Green), it is unable to keep up
with weekly seasonality and daily peaks
25
TBATS Conclusion:
• MAE = 20.00773
• RMSE = 25.88035
• As we can see from the charts, while the Model is able to
follow the trend of the data, and also navigate the yearly
seasonality of the data. However, it is unable to handle
weekly seasonality.
• It is also unable to get close to the daily peaks and troughs.
26
7.
NNAR
27
8.
Prophet
29
Characteristics of the Data
Identified by Prophet while Fitting the Model
Prophet Model Fit (2013-2016) and Forecast (2017)
31
Prophet Forecast 2017 (looking at 3 month Windows)
32
Above: Prophet is able to keep up with Trend (Yellow) and Yearly
Seasonality (Green)
Below: It is able to model weekly seasonality, and gets close to daily
peaks
33
Prophet Conclusion:
• MAE = 13.52374
• RMSE = 17.01999
• As we can see from the charts, the Model is able to follow
the trend of the data, and also navigate the yearly
seasonality of the data. It is also able to handle weekly
seasonality.
• However, though it gets close to daily peaks and troughs, it
overshoots/undershoots them multiple times.
• When presented with a data with lower daily variance, the
fit should be much tighter.
34
9.
H2O AutoML
35
H2O AutoML Leaderboard, and best model
H2O AutoML Leader Model Forecast (2017)
37
H2O AutoML Leader Model Forecast 2017
(looking at 3 month Windows)
38
Right: Model is able to keep up with Trend
and Yearly Seasonality (Yellow)
39
H2O AutoML Leader Model Conclusion:
• MAE = 13.85142
• RMSE = 18.09316
• As we can see from the charts, the Model is able to follow
the trend of the data, and also navigate the yearly
seasonality of the data. It is also able to handle weekly
seasonality.
• However, though it gets close to daily peaks and troughs, it
overshoots/undershoots them multiple times.
• When presented with a data with lower daily variance, the
fit should be much tighter.
40
10.
LSTM Model
41
LSTM Model Forecast (2017)
42
LSTM Model Forecast 2017
(looking at 3 month Windows)
43
Right: Model is able to keep up with Trend
and Yearly Seasonality (Yellow)
44
LSTM Model Conclusion:
• MAE = 16.7863
• RMSE = 21.65362
• As we can see from the charts, the Model is able to follow
the trend of the data, and also navigate the yearly
seasonality of the data. It is also able to handle weekly
seasonality.
• It overshoots/undershoots the daily peaks and troughs
multiple times.
• When presented with a data with lower daily variance, the
fit should be much tighter.
45
11.
Comparing Models
46
Comparing Models:
MAE RMSE
47
1. Prophet
2. H2O AutoML
We will be going forward with
these two Tools.
48
12.
Prophet <v/s>
H2O AutoML
Final Comparision
49
Modifying the Data to Reflect our business case:
Index Date Product Sub Product Volume STP TSU Index Date Product Sub Product Volume STP TSU
1 01-01-13 INWARD_SWIFT NA 179 STP Hyderabad 1306 01-01-13 INWARD_SWIFT NA 90 NON-STP Hyderabad
2 02-01-13 INWARD_SWIFT NA 191 STP Hyderabad 1307 02-01-13 INWARD_SWIFT NA 96 NON-STP Hyderabad
3 03-01-13 INWARD_SWIFT NA 209 STP Hyderabad 1308 03-01-13 INWARD_SWIFT NA 105 NON-STP Hyderabad
4 04-01-13 INWARD_SWIFT NA 217 STP Hyderabad 1309 04-01-13 INWARD_SWIFT NA 109 NON-STP Hyderabad
5 07-01-13 INWARD_SWIFT NA 180 STP Hyderabad 1310 07-01-13 INWARD_SWIFT NA 90 NON-STP Hyderabad
6 08-01-13 INWARD_SWIFT NA 174 STP Hyderabad 1311 08-01-13 INWARD_SWIFT NA 87 NON-STP Hyderabad
7 09-01-13 INWARD_SWIFT NA 174 STP Hyderabad 1312 09-01-13 INWARD_SWIFT NA 87 NON-STP Hyderabad
8 10-01-13 INWARD_SWIFT NA 187 STP Hyderabad 1313 10-01-13 INWARD_SWIFT NA 94 NON-STP Hyderabad
9 11-01-13 INWARD_SWIFT NA 198 STP Hyderabad 1314 11-01-13 INWARD_SWIFT NA 99 NON-STP Hyderabad
10 14-01-13 INWARD_SWIFT NA 180 STP Hyderabad 1315 14-01-13 INWARD_SWIFT NA 90 NON-STP Hyderabad
50
Characteristics of the Data
Identified by Prophet while Fitting the Model
Prophet Model Fit (2013-2016) and Forecast (2017)
52
Prophet Forecast 2017 (looking at 3 month Windows)
53
Above: Prophet is able to keep up with Trend (Yellow) and Yearly
Seasonality (Green)
Below: It is able to model weekly seasonality, and gets very close to
daily peaks
54
Prophet Conclusion:
• MAE = 18.41301
• RMSE = 23.65726
• As we can see from the charts, the Model is able to follow
the trend of the data, and also navigate the yearly
seasonality of the data. It is also able to handle weekly
seasonality.
• It gets close to peaks and troughs most of the time.
55
H2O AutoML Leaderboard, and best model
H2O AutoML Leader Model Forecast (2017)
57
H2O AutoML Leader Model Forecast 2017
(looking at 3 month Windows)
58
Right: Model is able to keep up with Trend
and Yearly Seasonality (Yellow)
59
H2O AutoML Leader Model Conclusion:
• MAE = 19.50624
• RMSE = 24.99153
• As we can see from the charts, the Model is able to follow
the trend of the data, and also navigate the yearly
seasonality of the data. It is also able to handle weekly
seasonality.
• It gets close to the daily peaks and troughs most of the time
60
2017 Forecast Prophet v/s H2O AutoML
61
Comparing Models:
MAE RMSE
62
13.
Implementation
A look at how it will work
63
A look at how it will work
64
UI Mock Up
65
What is happening behind the scenes:
1. The Module takes your inputs to filter the primary dataset and to
create the input dataset.
66
What is happening behind the scenes:
Buddy: G Mahesh
68
Appendix: A Brief look at the model metrics
69