Presented at OAUG: Chicago 2012
www.trinamix.com
asharma@trinamix.com
----------------------------
Demantra Forecasting Methods: A Look Inside the Black Box of Statistical Forecasting
Oracle’s Demantra Demand Planning tool is delivered with nine specific statistical methods for forecasting demand. When Oracle’s Advanced Forecasting and Demand Modeling tool is licensed six additional statistical methods are made available.
The purpose of this presentation is to describe the basic statistical approach behind the various models and to discuss some of the underlying logic behind Demantra’s model selection.
Specific model types to be discussed include intermittent demand models, regression models, time series models, and exponential smoothing models.
A detailed real world example of the various models in use at company using Demantra will be presented and discussed.
At the end of this presentation Demantra users who are interested in “Nodal Tuning” specific elements of the forecast tree will understand more fully which forecast methods are the most logical to deploy.
About the Presenters:
Trinamix is an Oracle Partner firm that specializes in providing Oracle Value Chain Planning & ERP Services. Trinamix supports customers in multiple industry segments including high tech, consumer packaged goods, renewable energy, manufacturing, and semiconductors. Trinamix has its headquarters in San Jose, CA.
Amit Sharma is the Managing Partner at Trinamix. Amit has more than fifteen years of experience working with end users to implementing Oracle Value Chain Planning products.
5. Scope of discussion
• General Forecasting
– Evolution
– General Methods
• Forecasting in Demantra
– Setup and consideration
• Forecast Tree
• Parameters
• Engine Definition, Types and nodes
• Forecasting process
• Advanced Analytics
• Causals
7. Naïve Models
Naïve forecasting models are based exclusively on historical
observation of sales
They do not explain the underlying casual relationships which
produce the variable being forecasted.
Advantage: Inexpensive to develop, store data
and operate.
Disadvantage: Do not consider any possible
causal relationships that underlie the
forecasted variable.
Naïve models
1. To use actual sales of the current period as the
forecast for the next period; then, Yt+1 = Yt
2. If we consider trends, then, Yt+1 = Yt + (Yt – Yt-1)
8. Smoothing : Moving Averages
Definition:
Averages that are updated as new information is received.
With the moving average a manager simply employs, the most
recent observations, drops the oldest observation, in the earlier
calculation and calculates an average which is used as the
forecast for the next period.
Limitations:
• One has to retain a great deal of data.
• All data in the sample are weighed equally.
9. Smoothing: Exponential
Uses weighted average of past data as the basis for a forecast.
Y new = a Y old + (1-a) Y’ old, where,
Y new = exponentially smoothed average to be used as the forecast
Y old = most recent actual data
Y’old = most recent smoothed forecast
a = smoothing constant
Smoothing constant (or weight) has a value between 0 and 1 inclusive.
9
10. Zero Mean White Noise
Series
3
2
1
0 Series
-1
-2
-3
1
6
11
16
21
26
31
36
41
46
51
56
61
66
71
76
81
86
91
96
11. Zero Mean White Noise
3
2
1
Series
0
0.1
-1
-2
-3
1
6
11
16
21
26
31
36
41
46
51
56
61
66
71
76
81
86
91
96
12. Zero Mean White Noise
3
2
1
Series
0 0.1
0.3
-1
-2
-3
1
6
11
16
21
26
31
36
41
46
51
56
61
66
71
76
81
86
91
96
13. White Noise with Shifting Mean
4
3
2
1
Series
0
Mean
-1
-2
-3
11
16
21
26
31
36
41
46
51
56
61
66
71
76
81
86
91
96
1
6
-4
14. White Noise with Shifting Mean
4
3
2
1
Series
0 0.1
Mean
-1
-2
-3
-4
1
6
11
16
21
26
31
36
41
46
51
56
61
66
71
76
81
86
91
96
15. White Noise with Shifting Mean
4
3
2
1
Series
0 0.3
Mean
-1
-2
-3
-4
1
6
11
16
21
26
31
36
41
46
51
56
61
66
71
76
81
86
91
96
16. Best Value for Alpha
Actual vs Forecast for
Various Alpha
2
1.5
1
0.5 Demand
Forecast
a=0.1
0
a=0.3
-0.5 a=0.9
-1
-1.5
-2
1
7
13
19
25
31
37
43
49
55
61
67
73
79
85
91
97
Period
17. Best Value for Alpha
Series and Forecast using Alpha=0.9
2
Might look good, but is it?
1.5
1
0.5
Forecast
0
-0.5
-1
-1.5
-2
1
6
11
16
21
26
31
36
41
46
51
56
61
66
71
76
81
86
91
96
101
Period
18. Best Value for Alpha
Series and Forecast using Alpha=0.9
2
1.5
1
0.5
Forecast
0
-0.5
-1
-1.5
-2
1
6
11
16
21
26
31
36
41
46
51
56
61
66
71
76
81
86
91
96
101
Period
20. Exponential smoothing
The following Rules of Thumb may be given :
1. When the magnitude of the random variations is
large, give a lower value to “a” so as to average out the
effects of the random variation quickly.
2. When the magnitude of the random variation is
moderate, a large value can be assigned to the
smoothing constant “a”.
3. It has been found appropriate to have “a” between 0.1
and 0.2 in many systems.
This method has been successfully applied by
banks, manufacturing companies, wholesalers and other
organizations.
22. Demantra Forecasting Ideology
Most Solutions Demantra
• Best Of Breed • Bayesian Estimator
– A series of models execute at • Library of models is executed
a “node”
• Based on goodness of fit models
– Model best meeting selection combined into single result set
criteria chosen
• Nuances of models maintained
– Any information not captured
by selected model is lost
• One Forecasting Level • Variable Forecast Level
– Not flexible for noise or lack • Forecast at most applicable level
of historical information
24. Oracle Demantra – Bayesian Model
Estimating techniques based on the assumption that the variable to be forecast
(dependent variable) has cause-and-effect relationship with one or more other
(independent) variables.
24
26. Forecast Tree Definition
4
The forecast tree determines
which item/location aggregation
combinations the engine will work
3
on.
The highest level (highest number)
2
is ALWAYS all items/all locations
and is fictive- not actually used.
The second highest level is the
1 FIRST level actually examined for
forecast
27. Traversing the Forecast Tree
The engine examines each node in the
4 forecast tree, from top to bottom:-
• The nodes are examined to see if a
3 forecast is possible at son of the node
and traversal continues
• Once a stopping rule is reached on
2 the downward traversal forecast is
executed
1 Stopping Rules
• Reached lowest tree level
• Reached desired forecast level
• Insufficient data available at lower
levels
28. Traversing the Forecast Tree Continued
4 • Once a stop has been reached
generate a forecast
3 • Traverse to brothers and continue
traversal
2 • Before going up check if any sons
require a forecast if required generate
a forecast
1 • Continue until entire tree traversed
29. Forecast Split
4 • Higher aggregation of forecast split
to lower members who do not have
3 a forecast
• Forecast is split according to
2 defined proportion rule-set
• Forecast always stored at lowest
1 system aggregation to enable view
of data at any query level
30. Forecast Tree Configuration Continued
• Define forecast tree
– Forecast tree combination of item and location levels
– Begin with Lowest Item / Lowest Location level
– Continue upward in increasing order
– Highest level if fictive level Highest Item / Highest Location
– Define minimum and maximum levels in tree
31. High Level Engine Flow
Pre Engine Learning Phase Forecasting Post Engine
Processing • Tree traversal Phase Processing
• Distribute engine • Per node process • Generate forecast • Drop temporary
tasks • Fit generation • Split Forecast to tables
• Create temporary • Bayesian lowest level • Update forecast
tables combination history
• Clear previous • Notify of
forecast data completion
• Maintain forecast
columns
32. Distributed Engine
• Full data set divided into
tasks
• Each task comprised of one
or more engine branches
• For recommended Branch
ID Multiplier divide planned
rows in Sales_data/
(Engines) /250,000
33. Models
• The Analytical Engine uses a set of theoretical
models, each trying to explain history using
different methods and algorithms.
– Regression
• Regression
• Log (log transformation before regression)
• CMReg (Markov chain selection of subset of causal
factors)
• Elog (uses Markov chain after log transformation)
– Exponential smoothing
• Holt
• Bwint
– Intermittent Models
• CMReg for Intermittent
• Regression for Intermittent
• Croston
– Time Series Models
• ARX and ARIX
• Logistic and AR Logistic
– Other Models
• BWint (a mixture of regression and exponential
smoothing)
• DMULT (Multiplicative)
34. DP and PE modes
• Depending on installation and
settings, you will run the engine in
one of two modes:
– DP Mode
• Base Only causals
• Base Forecast Generated
– PE Mode
• Base and Promotional causals
• Forecast decomposed to base and lift
35. Engine Parameters
• Max Fore Level
– The maximum level on the forecast tree at which a forecast may
be produced. Upon failure at this level, the NAIVE model will be
used, if enabled.
– The NAIVE model is used only at the highest forecast level, and is
used only if all other models have failed. It uses a simple
averaging procedure.
• Min Fore Level
– Minimum forecast level that the engine will forecast. From that
level down, the engine will split the forecast using the
precalculated proportions in the mdp_matrix table.
– The engine does not necessarily create the forecast at this level.
If the results are not good at this level (for a portion of the
forecast tree), the Analytical Engine moves to a higher node of
the forecast tree, creates a forecast there, and splits down to the
minimum forecast level.
36. Engine Parameters (cont.)
• Forecast Generation Horizon
– Specifies what historical fit data the engine will write to the
database. If this parameter is 0, the engine writes the
forecast only. If this parameter is a positive integer N, the
engine writes the last N historical fit values.
• History Length
– The number of base time buckets to consider for fit
estimation and for the proport mechanism. Must be a non-
negative integer. If equal to 0, the length of the history is
set by the start_date parameter instead.
37. Engine Parameters (cont.)
• Detect Outlier - This parameter is used by the preprocessing
module of the Analytical Engine. Use one of the following
values:
– yes: The engine should attempt to detect outliers. If it finds
outliers, it considers them in the analysis.
– no: The engine should not attempt to detect outliers.
• Quantity Form
– Expression that the Analytical Engine uses to compose the
historical demand from the sales_data table; the result of this
expression is the data that the engine receives as input.
– This expression should return 0, null, or a numeric quantity for
any date. A date with 0 is treated as if there were no sales. A date
with null is treated as a missing date; in this case, the system can
interpolate a value or just ignore the date.
38. Engine Parameters (cont.)
• Dying Time
– If no sales occurred during the length of time specified by this
parameter, the combination is marked as dead.
• Hist Glob Prop
– Maximum number of base time buckets to use in calculating
glob_prop, the running average demand for any given item-
location combination. This parameter is used by the proport
mechanism.
41. Advanced Analytics/Nodal Tuning
• What you can do here:
– Fine-tune which engine models to use on this node (this combination)
– Specify how many data points are needed to use each model
44. Global Causal Factors
Global causal factors apply to all combinations varying only by time
Default Causals
• Trend
• Month of the year
• Constant
• Winter
• Summer
Typical Causals
• Business days in the month
• Holidays
• Week ending the quarter
45. Local Causal Factors
Local causal factors varies by item/location/time
Vary greatly by customer business
Default Causals
• Price
Typical Causals
• Number of open stores
• Events
• Weather
48. Who We Are
Trinamix is a provider of Oracle Value
Chain Planning & ERP services. Trinamix
solutions focus on deploying best
practices to maximize return on
investment.
Trinamix is a prominent, full service, Value Chain Planning solution
company with multiple customer success stories in the San Francisco Bay
area. Trinamix offers pre-built solutions for various industries. Specific
industry segments served include high tech, consumer packaged goods,
renewable energy, manufacturing, and semiconductors.
Trinamix was founded by former members
of the prestigious Oracle Product
Development team, who helped create the
Value Chain Planning products, and by
best in class implementation experts.
48
49. On the
Click to edit Master title style TRAC
Email: asharma@trinamix.com
49