demantra forecasting engine : oaug chicago 2012

49
Trinamix Technologies Demantra Forecasting Methods A Look Inside the Black Box Amit Sharma Trinamix

Upload: amit-trinamix

Post on 14-Jun-2015

5.977 views

Category:

Business


6 download

DESCRIPTION

Presented at OAUG: Chicago 2012 www.trinamix.com [email protected] ---------------------------- 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.

TRANSCRIPT

Page 1: Demantra Forecasting Engine : OAUG Chicago 2012

Trinamix Technologies

Demantra Forecasting Methods A Look Inside the Black Box

Amit Sharma Trinamix

Page 2: Demantra Forecasting Engine : OAUG Chicago 2012

Accurate forecasting is easy…

2

Here is the formula for the same…..

Page 3: Demantra Forecasting Engine : OAUG Chicago 2012

Why it’s hard to be accurate?

3

Forecasting is an art of predicting the future by looking the past !

Page 4: Demantra Forecasting Engine : OAUG Chicago 2012

4

Why is it important to be accurate ?

Page 5: Demantra Forecasting Engine : OAUG Chicago 2012

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

Page 6: Demantra Forecasting Engine : OAUG Chicago 2012

Forecasting Evolution

Naïve forecasting

Moving Average

ExponentialSmoothing

AdvancedMethods

Page 7: Demantra Forecasting Engine : OAUG Chicago 2012

Naïve Models

Advantage: Inexpensive to develop, store data and operate.

Disadvantage: Do not consider any possible causal relationships that underlie the forecasted variable.

Naïve models1. 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)

Naïve forecasting models are based exclusively on historical observation of salesThey do not explain the underlying casual relationships which produce the variable being forecasted.

Page 8: Demantra Forecasting Engine : OAUG Chicago 2012

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.

Page 9: Demantra Forecasting Engine : OAUG Chicago 2012

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 forecastY old = most recent actual dataY’old = most recent smoothed forecasta = smoothing constantSmoothing constant (or weight) has a value between 0 and 1 inclusive.

Smoothing: Exponential

9

Page 10: Demantra Forecasting Engine : OAUG Chicago 2012

Series

-3

-2

-1

0

1

2

3

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96

Series

Zero Mean White Noise

Page 11: Demantra Forecasting Engine : OAUG Chicago 2012

Zero Mean White Noise

-3

-2

-1

0

1

2

3

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96

Series

0.1

Page 12: Demantra Forecasting Engine : OAUG Chicago 2012

Zero Mean White Noise

-3

-2

-1

0

1

2

3

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96

Series

0.1

0.3

Page 13: Demantra Forecasting Engine : OAUG Chicago 2012

White Noise with Shifting Mean

-4

-3

-2

-1

0

1

2

3

4

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96

Series

Mean

Page 14: Demantra Forecasting Engine : OAUG Chicago 2012

White Noise with Shifting Mean

-4

-3

-2

-1

0

1

2

3

4

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96

Series

0.1

Mean

Page 15: Demantra Forecasting Engine : OAUG Chicago 2012

White Noise with Shifting Mean

-4

-3

-2

-1

0

1

2

3

4

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96

Series

0.3

Mean

Page 16: Demantra Forecasting Engine : OAUG Chicago 2012

Best Value for Alpha

Actual vs Forecast for Various Alpha

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97

Period

Fo

reca

st

Demand

a=0.1

a=0.3

a=0.9

Page 17: Demantra Forecasting Engine : OAUG Chicago 2012

Best Value for Alpha

Series and Forecast using Alpha=0.9

-2

-1.5

-1

-0.5

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

Fo

reca

st

Might look good, but is it?

Page 18: Demantra Forecasting Engine : OAUG Chicago 2012

Best Value for Alpha

Series and Forecast using Alpha=0.9

-2

-1.5

-1

-0.5

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

Fo

reca

st

Page 19: Demantra Forecasting Engine : OAUG Chicago 2012

Best Value for Alpha

Page 20: Demantra Forecasting Engine : OAUG Chicago 2012

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.

Page 21: Demantra Forecasting Engine : OAUG Chicago 2012

FORECASTING IN DEMANTRA

21

Page 22: Demantra Forecasting Engine : OAUG Chicago 2012

Demantra Forecasting Ideology

Most Solutions

• Best Of Breed– A series of models execute

at a “node”– Model best meeting

selection criteria chosen– Any information not

captured by selected model is lost

• One Forecasting Level– Not flexible for noise or lack

of historical information

Demantra

• Bayesian Estimator• Library of models is executed• Based on goodness of fit

models combined into single result set

• Nuances of models maintained

• Variable Forecast Level• Forecast at most applicable

level

Page 23: Demantra Forecasting Engine : OAUG Chicago 2012

Traditional fit

23

Page 24: Demantra Forecasting Engine : OAUG Chicago 2012

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.

Page 25: Demantra Forecasting Engine : OAUG Chicago 2012

Trinamix Technologies

Demantra Engine

Setup and Considerations

Page 26: Demantra Forecasting Engine : OAUG Chicago 2012

4

3

2

1

The forecast tree determines which item/location aggregation combinations the engine will work on.

The highest level (highest number) is ALWAYS all items/all locations and is fictive- not actually used.

The second highest level is the FIRST level actually examined for forecast

Forecast Tree Definition

Page 27: Demantra Forecasting Engine : OAUG Chicago 2012

4

3

2

1

The engine examines each node in the forecast tree, from top to bottom:-

• The nodes are examined to see if a forecast is possible at son of the node and traversal continues

• Once a stopping rule is reached on the downward traversal forecast is executed

Stopping Rules• Reached lowest tree level• Reached desired forecast level• Insufficient data available at lower

levels

Traversing the Forecast Tree

Page 28: Demantra Forecasting Engine : OAUG Chicago 2012

4

3

2

1

• Once a stop has been reached generate a forecast

• Traverse to brothers and continue traversal

• Before going up check if any sons require a forecast if required generate a forecast

• Continue until entire tree traversed

Traversing the Forecast Tree Continued

Page 29: Demantra Forecasting Engine : OAUG Chicago 2012

4

3

2

1

• Higher aggregation of forecast split to lower members who do not have a forecast

• Forecast is split according to defined proportion rule-set

• Forecast always stored at lowest system aggregation to enable view of data at any query level

Forecast Split

Page 30: Demantra Forecasting Engine : OAUG Chicago 2012

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

Page 31: Demantra Forecasting Engine : OAUG Chicago 2012

High Level Engine Flow

Pre Engine Processing• Distribute engine

tasks• Create

temporary tables• Clear previous

forecast data• Maintain forecast

columns

Learning Phase• Tree traversal• Per node

process• Fit generation• Bayesian

combination

Forecasting Phase• Generate

forecast• Split

Forecast to lowest level

Post Engine Processing• Drop

temporary tables

• Update forecast history

• Notify of completion

Page 32: Demantra Forecasting Engine : OAUG Chicago 2012

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

Page 33: Demantra Forecasting Engine : OAUG Chicago 2012

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)

Page 34: Demantra Forecasting Engine : OAUG Chicago 2012

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

Page 35: Demantra Forecasting Engine : OAUG Chicago 2012

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.

Page 36: Demantra Forecasting Engine : OAUG Chicago 2012

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.

Page 37: Demantra Forecasting Engine : OAUG Chicago 2012

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.

Page 38: Demantra Forecasting Engine : OAUG Chicago 2012

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.

Page 39: Demantra Forecasting Engine : OAUG Chicago 2012

• Refers to the Analytics window, accessed by clicking here…

Advanced Analytics/Nodal Tuning

Page 40: Demantra Forecasting Engine : OAUG Chicago 2012

Advanced Analytics/Nodal Tuning

• Brings up another window focused on the same combination where you started:

Page 41: Demantra Forecasting Engine : OAUG Chicago 2012

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

Page 42: Demantra Forecasting Engine : OAUG Chicago 2012

Advanced Analytics/Nodal Tuning

• Also:– Fine-tune engine parameter settings for this

node

Page 43: Demantra Forecasting Engine : OAUG Chicago 2012

Causal factors43

Page 44: Demantra Forecasting Engine : OAUG Chicago 2012

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

Page 45: Demantra Forecasting Engine : OAUG Chicago 2012

Local Causal Factors

Local causal factors varies by item/location/time Vary greatly by customer business

Default Causals• PriceTypical Causals• Number of open stores• Events• Weather

Page 46: Demantra Forecasting Engine : OAUG Chicago 2012

Pre-seeded Causal factor

Page 47: Demantra Forecasting Engine : OAUG Chicago 2012

Trinamix Technologies

TrinamixValue Chain Experts

Page 48: Demantra Forecasting Engine : OAUG Chicago 2012

48

Who We Are

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.

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.

mochakra