Automatic Forecasting Support System for Business Analytics - - PowerPoint PPT Presentation

automatic forecasting support system for business
SMART_READER_LITE
LIVE PREVIEW

Automatic Forecasting Support System for Business Analytics - - PowerPoint PPT Presentation

Introduction Unobserved Components models Forecasting methods Case study Conclusions Automatic Forecasting Support System for Business Analytics applications based on Unobserved Components models DJ Pedregal, MA Villegas, D Villegas


slide-1
SLIDE 1

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Automatic Forecasting Support System for Business Analytics applications based on Unobserved Components models

DJ Pedregal, MA Villegas, D Villegas

Universidad de Castilla-La Mancha

ETSII (Ciudad Real)

PREDILAB Diego.Pedregal@uclm.es

EURO2018, Valencia, July 2018

DJ Pedregal, MA Villegas, D Villegas PREDILAB 1/19

slide-2
SLIDE 2

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Outline

1 Introduction 2 Unobserved Components models 3 Forecasting methods 4 Case study 5 Conclusions

DJ Pedregal, MA Villegas, D Villegas PREDILAB 2/19

slide-3
SLIDE 3

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Objectives of this work: Contribute to the dissemination of Unobserved Components models (UC) to a wider audience.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 3/19

slide-4
SLIDE 4

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Objectives of this work: Contribute to the dissemination of Unobserved Components models (UC) to a wider audience. Develop a general Automatic Forecasting Support System based on UC models. This is the first time that automatic identification of UC has been proposed.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 3/19

slide-5
SLIDE 5

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Objectives of this work: Contribute to the dissemination of Unobserved Components models (UC) to a wider audience. Develop a general Automatic Forecasting Support System based on UC models. This is the first time that automatic identification of UC has been proposed. Compare the new system with other approaches, like different implementations of other methods, mainly ARIMA and ExponenTial Smoothing.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 3/19

slide-6
SLIDE 6

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Objectives of this work: Contribute to the dissemination of Unobserved Components models (UC) to a wider audience. Develop a general Automatic Forecasting Support System based on UC models. This is the first time that automatic identification of UC has been proposed. Compare the new system with other approaches, like different implementations of other methods, mainly ARIMA and ExponenTial Smoothing. Show it forecasting automatically on the 166 products of a food franchise chain in Spain.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 3/19

slide-7
SLIDE 7

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Objectives of this work: Contribute to the dissemination of Unobserved Components models (UC) to a wider audience. Develop a general Automatic Forecasting Support System based on UC models. This is the first time that automatic identification of UC has been proposed. Compare the new system with other approaches, like different implementations of other methods, mainly ARIMA and ExponenTial Smoothing. Show it forecasting automatically on the 166 products of a food franchise chain in Spain. Disseminate SSpace, a MATLAB toolbox implementing most methods used in this work (Villegas and Pedregal, 2018; https://bitbucket.org/predilab/sspace-matlab).

DJ Pedregal, MA Villegas, D Villegas PREDILAB 3/19

slide-8
SLIDE 8

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Exponential Smoothing continues to be the most used modeling technique in business and industry, at least in areas ranging from inventory management and scheduling to planning. Several reasons: Ad-hoc method, easy to understand and communicate to managers. Formal statistical revision in the last 15 years. Implemented in many packages, including automatic identification procedures.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 4/19

slide-9
SLIDE 9

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Exponential Smoothing continues to be the most used modeling technique in business and industry, at least in areas ranging from inventory management and scheduling to planning. Several reasons: Ad-hoc method, easy to understand and communicate to managers. Formal statistical revision in the last 15 years. Implemented in many packages, including automatic identification procedures. ARIMA is the second method most used, because it is well-known to many researchers and also there are many packages implementing even automatic identification procedures.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 4/19

slide-10
SLIDE 10

Introduction Unobserved Components models Forecasting methods Case study Conclusions

There is a family of models that has been systematically

  • verlooked, namely structural Unobserved Components models

(UC). At least five reasons:

DJ Pedregal, MA Villegas, D Villegas PREDILAB 5/19

slide-11
SLIDE 11

Introduction Unobserved Components models Forecasting methods Case study Conclusions

There is a family of models that has been systematically

  • verlooked, namely structural Unobserved Components models

(UC). At least five reasons: General use for signal extraction and very little for forecasting purposes.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 5/19

slide-12
SLIDE 12

Introduction Unobserved Components models Forecasting methods Case study Conclusions

There is a family of models that has been systematically

  • verlooked, namely structural Unobserved Components models

(UC). At least five reasons: General use for signal extraction and very little for forecasting purposes. UC models have been developed in academic environments, with no strategy for their dissemination among practitioners for their everyday use in business and industry.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 5/19

slide-13
SLIDE 13

Introduction Unobserved Components models Forecasting methods Case study Conclusions

There is a family of models that has been systematically

  • verlooked, namely structural Unobserved Components models

(UC). At least five reasons: General use for signal extraction and very little for forecasting purposes. UC models have been developed in academic environments, with no strategy for their dissemination among practitioners for their everyday use in business and industry. The widely-held but not-scientifically-tested feeling that UC models do not really have anything relevant to add to ETS methods.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 5/19

slide-14
SLIDE 14

Introduction Unobserved Components models Forecasting methods Case study Conclusions

There is a family of models that has been systematically

  • verlooked, namely structural Unobserved Components models

(UC). At least five reasons: General use for signal extraction and very little for forecasting purposes. UC models have been developed in academic environments, with no strategy for their dissemination among practitioners for their everyday use in business and industry. The widely-held but not-scientifically-tested feeling that UC models do not really have anything relevant to add to ETS methods. UC models are usually identified by hand, with automatic identification being very rare.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 5/19

slide-15
SLIDE 15

Introduction Unobserved Components models Forecasting methods Case study Conclusions

There is a family of models that has been systematically

  • verlooked, namely structural Unobserved Components models

(UC). At least five reasons: General use for signal extraction and very little for forecasting purposes. UC models have been developed in academic environments, with no strategy for their dissemination among practitioners for their everyday use in business and industry. The widely-held but not-scientifically-tested feeling that UC models do not really have anything relevant to add to ETS methods. UC models are usually identified by hand, with automatic identification being very rare. Software is scarcer.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 5/19

slide-16
SLIDE 16

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Unobserved Components models

UC models aim at decomposing a vector of time series into meaningful components explicitly, namely trend, cycle, seasonal, and irregular. Other components may be considered as well, typically cycles and components relating the output variables to inputs modeled as linear regressions, transfer functions or non-linear relationships. A general representation is given by zt = Tt + Ct + St + f (ut) + It (1) where zt is a vector of time series, Tt, Ct, St and It stand for vectors of trends, cycles, seasonal and irregular components,

  • respectively. The term f (ut) models the relation between a vector
  • f inputs ut and the outputs zt.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 6/19

slide-17
SLIDE 17

Introduction Unobserved Components models Forecasting methods Case study Conclusions

In this structural approach, the key issue is to select appropriate dynamic models for each of the components involved. In general terms, trends should have at least one unit root, seasonal components should show up some kind of stochastic sinusoidal dynamic behaviour, and irregular components should be either white or coloured noise.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 7/19

slide-18
SLIDE 18

Introduction Unobserved Components models Forecasting methods Case study Conclusions

In this structural approach, the key issue is to select appropriate dynamic models for each of the components involved. In general terms, trends should have at least one unit root, seasonal components should show up some kind of stochastic sinusoidal dynamic behaviour, and irregular components should be either white or coloured noise. The UC model is set up in a State Space framework and the Kalman Filter and Smoothing algorithms provide the optimal estimates of the state vector and its covariance matrices. Maximum Likelihood estimation may be done on the general formulation of SS systems, etc.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 7/19

slide-19
SLIDE 19

Introduction Unobserved Components models Forecasting methods Case study Conclusions Forecasting methods (I) Forecasting methods (II) Forecasting methods (and III)

Forecasting methods (I)

A number of methods has been compared in this work, all based

  • n automatic identification techniques:

Benchmarks: i) Na¨ ıve, Seasonal Na¨ ıve and ii) AR, automatic AR models with order optimised by minimising the BIC.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 8/19

slide-20
SLIDE 20

Introduction Unobserved Components models Forecasting methods Case study Conclusions Forecasting methods (I) Forecasting methods (II) Forecasting methods (and III)

Forecasting methods (I)

A number of methods has been compared in this work, all based

  • n automatic identification techniques:

Benchmarks: i) Na¨ ıve, Seasonal Na¨ ıve and ii) AR, automatic AR models with order optimised by minimising the BIC. Automatic identification of ARIMA models with three implementations:

R-ARIMA: Hyndman and Khandakar (2008) in R package ‘forecast’.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 8/19

slide-21
SLIDE 21

Introduction Unobserved Components models Forecasting methods Case study Conclusions Forecasting methods (I) Forecasting methods (II) Forecasting methods (and III)

Forecasting methods (I)

A number of methods has been compared in this work, all based

  • n automatic identification techniques:

Benchmarks: i) Na¨ ıve, Seasonal Na¨ ıve and ii) AR, automatic AR models with order optimised by minimising the BIC. Automatic identification of ARIMA models with three implementations:

R-ARIMA: Hyndman and Khandakar (2008) in R package ‘forecast’. ARIMA: A modified version of Hyndman and Khandakar (2008) to avoid problems with differentation order, implemented in SSpace.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 8/19

slide-22
SLIDE 22

Introduction Unobserved Components models Forecasting methods Case study Conclusions Forecasting methods (I) Forecasting methods (II) Forecasting methods (and III)

Forecasting methods (I)

A number of methods has been compared in this work, all based

  • n automatic identification techniques:

Benchmarks: i) Na¨ ıve, Seasonal Na¨ ıve and ii) AR, automatic AR models with order optimised by minimising the BIC. Automatic identification of ARIMA models with three implementations:

R-ARIMA: Hyndman and Khandakar (2008) in R package ‘forecast’. ARIMA: A modified version of Hyndman and Khandakar (2008) to avoid problems with differentation order, implemented in SSpace. TRAMO: G´

  • mez and Maravall (2001) implemented in

TRAMO with and without outliers identification.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 8/19

slide-23
SLIDE 23

Introduction Unobserved Components models Forecasting methods Case study Conclusions Forecasting methods (I) Forecasting methods (II) Forecasting methods (and III)

Forecasting methods (II)

Exponential smoothing:

DJ Pedregal, MA Villegas, D Villegas PREDILAB 9/19

slide-24
SLIDE 24

Introduction Unobserved Components models Forecasting methods Case study Conclusions Forecasting methods (I) Forecasting methods (II) Forecasting methods (and III)

Forecasting methods (II)

Exponential smoothing:

ETS: Implemented in SSpace (by inimising BIC):

Level: no level, additive, damped additive. Growth: no growth, growth. Seasonal: no seasonal, seasonal. AR models of order 0 to 3.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 9/19

slide-25
SLIDE 25

Introduction Unobserved Components models Forecasting methods Case study Conclusions Forecasting methods (I) Forecasting methods (II) Forecasting methods (and III)

Forecasting methods (II)

Exponential smoothing:

ETS: Implemented in SSpace (by inimising BIC):

Level: no level, additive, damped additive. Growth: no growth, growth. Seasonal: no seasonal, seasonal. AR models of order 0 to 3.

R-ETS: implemented in the R package ‘forecast’ (Hyndman and Khandakar, 2008).

DJ Pedregal, MA Villegas, D Villegas PREDILAB 9/19

slide-26
SLIDE 26

Introduction Unobserved Components models Forecasting methods Case study Conclusions Forecasting methods (I) Forecasting methods (II) Forecasting methods (and III)

Forecasting methods (II)

Exponential smoothing:

ETS: Implemented in SSpace (by inimising BIC):

Level: no level, additive, damped additive. Growth: no growth, growth. Seasonal: no seasonal, seasonal. AR models of order 0 to 3.

R-ETS: implemented in the R package ‘forecast’ (Hyndman and Khandakar, 2008).

Combination methods: i) Mean and ii) Median of AR, ARIMA, UC and ETS methods estimated with SSpace.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 9/19

slide-27
SLIDE 27

Introduction Unobserved Components models Forecasting methods Case study Conclusions Forecasting methods (I) Forecasting methods (II) Forecasting methods (and III)

Forecasting methods (and III)

UC: Unobserved Components models (in SSpace, minimising BIC):

Trend: Random Walk, Integrated Random Walk, Local Linear Trend, Damped trend.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 10/19

slide-28
SLIDE 28

Introduction Unobserved Components models Forecasting methods Case study Conclusions Forecasting methods (I) Forecasting methods (II) Forecasting methods (and III)

Forecasting methods (and III)

UC: Unobserved Components models (in SSpace, minimising BIC):

Trend: Random Walk, Integrated Random Walk, Local Linear Trend, Damped trend. Seasonal: No seasonal, trigonometric seasonal with common variance for all harmonics and trigonometric seasonal without common variance for all harmonics.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 10/19

slide-29
SLIDE 29

Introduction Unobserved Components models Forecasting methods Case study Conclusions Forecasting methods (I) Forecasting methods (II) Forecasting methods (and III)

Forecasting methods (and III)

UC: Unobserved Components models (in SSpace, minimising BIC):

Trend: Random Walk, Integrated Random Walk, Local Linear Trend, Damped trend. Seasonal: No seasonal, trigonometric seasonal with common variance for all harmonics and trigonometric seasonal without common variance for all harmonics. Irregular: White noise or AR coloured noise orders up to 3rd

  • rder.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 10/19

slide-30
SLIDE 30

Introduction Unobserved Components models Forecasting methods Case study Conclusions Data Metrics Results

Data

The proposed evaluation of the models was carried out on the 166 products sales from a food franchise in Spain. The company specializes in selling everyday dishes made from natural products at affordable prices in take-away and take-in formats. 517 daily sales

  • bservations were made available for each product with 414
  • bservations used for in-sample estimation and the remainder for
  • ut-of-sample evaluation. A set of 90, 14 days ahead forecast

rounds was carried out for each product.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 11/19

slide-31
SLIDE 31

Introduction Unobserved Components models Forecasting methods Case study Conclusions Data Metrics Results

Data

50 100 150 200 250 300 350 400 450 500

Days

100 200

Sales

50 100 150 200 250 300 350 400 450 500

Days

500 1000 1500 2000 2500

Sales

50 100 150 200 250 300 350 400 450 500

Days

50 100 150

Sales

DJ Pedregal, MA Villegas, D Villegas PREDILAB 12/19

slide-32
SLIDE 32

Introduction Unobserved Components models Forecasting methods Case study Conclusions Data Metrics Results

Metrics

Cumulative Absolute Scaled Error: CsEh = 1 h

h

  • l=1

sEh where the Absolute Scaled Error is sEh = |zT+h − ˆ zT+h|

1 T

T

i=1 zi

DJ Pedregal, MA Villegas, D Villegas PREDILAB 13/19

slide-33
SLIDE 33

Introduction Unobserved Components models Forecasting methods Case study Conclusions Data Metrics Results 5 10 15 Horizon 0.42 0.44 0.46 0.48 75% percentile 0.22 0.24 0.26 0.28 0.3 Median

ARIMA AR ETS UC Mean Median

Median (top panel) and 75 % percentile (bottom panel) of CsEh for all models implemented in SSpace.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 14/19

slide-34
SLIDE 34

Introduction Unobserved Components models Forecasting methods Case study Conclusions Data Metrics Results 0.22 0.24 0.26 0.28 0.3 Median

R-ARIMA TRAMO TRAMO(*) R-ETS UC

5 10 15

Horizon

0.42 0.43 0.44 0.45

75% percentile

Median (top panel) and 75 % percentile (bottom panel) of CsEh for alternative models.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 15/19

slide-35
SLIDE 35

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Conclusions related to all models implemented in SSpace: As expected, forecasting performance worsens with longer horizons.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 16/19

slide-36
SLIDE 36

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Conclusions related to all models implemented in SSpace: As expected, forecasting performance worsens with longer horizons. All methods outperform both Na¨ ıve and AR benchmarks by a wide margin. AR systematically outperforms the seasonal Na¨ ıve.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 16/19

slide-37
SLIDE 37

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Conclusions related to all models implemented in SSpace: As expected, forecasting performance worsens with longer horizons. All methods outperform both Na¨ ıve and AR benchmarks by a wide margin. AR systematically outperforms the seasonal Na¨ ıve. UC is the best model for all forecast horizons, followed by ARIMA and ETS.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 16/19

slide-38
SLIDE 38

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Conclusions related to all models implemented in SSpace: As expected, forecasting performance worsens with longer horizons. All methods outperform both Na¨ ıve and AR benchmarks by a wide margin. AR systematically outperforms the seasonal Na¨ ıve. UC is the best model for all forecast horizons, followed by ARIMA and ETS. Simple forecast combination methods outperform ARIMA and ETS but do not improve on UC. The performance of ARIMA and ETS is very similar in this case.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 16/19

slide-39
SLIDE 39

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Conclusions related to all models implemented in SSpace: As expected, forecasting performance worsens with longer horizons. All methods outperform both Na¨ ıve and AR benchmarks by a wide margin. AR systematically outperforms the seasonal Na¨ ıve. UC is the best model for all forecast horizons, followed by ARIMA and ETS. Simple forecast combination methods outperform ARIMA and ETS but do not improve on UC. The performance of ARIMA and ETS is very similar in this case. The median of CsEh and sEh shows that most models offer very similar results. However, as the bottom panel shows, differences are more apparent when the 75 % percentile is

  • considered. The advantage of UC models is clearer in these

cases.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 16/19

slide-40
SLIDE 40

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Conclusions related to other pieces of software: R-AR performs worse than its AR counterpart in SSpace.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 17/19

slide-41
SLIDE 41

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Conclusions related to other pieces of software: R-AR performs worse than its AR counterpart in SSpace. On the other hand, R-ETS outperforms its ETS equivalent in

  • SSpace. This may be due mainly to the fact that R-ETS

allows for general ARMA models for the observational noise, while ETS constrain them to AR up to order 3. There are also

  • ther minor differences coming from differences in libraries

used by MATLAB and R, different initial conditions for parameter searches, different initial conditions for states when starting the Kalman Filter.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 17/19

slide-42
SLIDE 42

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Conclusions related to other pieces of software: R-AR performs worse than its AR counterpart in SSpace. On the other hand, R-ETS outperforms its ETS equivalent in

  • SSpace. This may be due mainly to the fact that R-ETS

allows for general ARMA models for the observational noise, while ETS constrain them to AR up to order 3. There are also

  • ther minor differences coming from differences in libraries

used by MATLAB and R, different initial conditions for parameter searches, different initial conditions for states when starting the Kalman Filter. Results shown for R-ARIMA are obtained constraining the seasonal differences to 1 in the automatic procedure. The errors are considerably larger when this parameter is selected fully automatically with formal unit roots.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 17/19

slide-43
SLIDE 43

Introduction Unobserved Components models Forecasting methods Case study Conclusions

TRAMO and TRAMO(*) are worse than R-ARIMA and R-ETS for longer horizons, although better for shorter ones.

DJ Pedregal, MA Villegas, D Villegas PREDILAB 18/19

slide-44
SLIDE 44

Introduction Unobserved Components models Forecasting methods Case study Conclusions

TRAMO and TRAMO(*) are worse than R-ARIMA and R-ETS for longer horizons, although better for shorter ones. Formal statistical tests to evaluate whether differences are statistically significant. This can be done with rank tests (Koning al., 2005) that rank methods by forecast error measurement (Mean Absolute Error in this case)

ARIMA ETS UC R-ARIMA R-ETS TRAMO TRAMO(*) Mean Median 3 4 5 6 7

Average Rank DJ Pedregal, MA Villegas, D Villegas PREDILAB 18/19

slide-45
SLIDE 45

Introduction Unobserved Components models Forecasting methods Case study Conclusions

Thank you for your attention!

e-mail: diego.pedregal@uclm.es blog: www.uclm.es/profesorado/diego/

This work has been supported by the Spanish Ministerio de Econom´ ıa y Competitividad, under Research Grant no. DPI2015-64133-R (MINECO/FEDER/UE)

DJ Pedregal, MA Villegas, D Villegas PREDILAB 19/19