One for all: forecasting intermittent and non-intermittent demand - - PowerPoint PPT Presentation

one for all forecasting intermittent and non intermittent
SMART_READER_LITE
LIVE PREVIEW

One for all: forecasting intermittent and non-intermittent demand - - PowerPoint PPT Presentation

Introduction Intermittent state-space model Model selection Experiments Finale References One for all: forecasting intermittent and non-intermittent demand using one model Ivan Svetunkov and John Boylan Presentation at University of Bath


slide-1
SLIDE 1

Introduction Intermittent state-space model Model selection Experiments Finale References

One for all: forecasting intermittent and non-intermittent demand using one model

Ivan Svetunkov and John Boylan

Presentation at University of Bath

30th March 2017

Lancaster Centre for

Forecasting

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-2
SLIDE 2

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Introduction

Typical forecasting task in supply chain is to produce forecasts for many products. Demand on each of the products may have its own characteristics and in general can be:

  • non-intermittent;
  • intermittent.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-3
SLIDE 3

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Introduction

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time Demand 2 4 6 8 10 12

Figure: Example of intermittent data.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-4
SLIDE 4

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Introduction

ETS(ANN)

1980.0 1980.5 1981.0 1981.5 1982.0 1982.5 2 4 6 8 10

Series Fitted values Point forecast Forecast origin

Figure: Simple Exponential Smoothing applied to the intermittent data.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-5
SLIDE 5

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Introduction

Intermittent data is considered as a separate case. It is identified and then forecasted, usually using Croston (1972): ˆ yt = 1

ˆ qt ˆ

zt ˆ zt = αzzt−1 + (1 − αz)ˆ zt−1 ˆ qt = αqqt−1 + (1 − αq)ˆ qt−1 , (1) where zt are the demand sizes, qt are the demand intervals, αz and αq are the smoothing parameters.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-6
SLIDE 6

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Introduction

5 10 15 20 25 30 2 4 6 8 10 12 Period

Figure: Intermittent data and Croston’s forecast.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-7
SLIDE 7

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Introduction

We also have SBA (Syntetos and Boylan, 2005), TSB (Teunter et al., 2011), HES (Prestwich et al., 2014), INARMA etc. All of them are separated from ETS / ARIMA / regression / etc.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-8
SLIDE 8

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Introduction

ETS(MAN)

1980 1982 1984 1986 1988 1990 1992 1994 7000 7500 8000 8500 9000 9500 10000

Series Fitted values Point forecast Forecast origin

Figure: Non-intermittent data and a forecast.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-9
SLIDE 9

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Introduction

How to categorise the data? Johnston and Boylan (1996), Syntetos et al. (2005), Petropoulos and Kourentzes (2015) BUT! Products can change their characteristics...

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-10
SLIDE 10

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Introduction

Demand on a fast moving product may become obsolete...

Time Demand 2 4 6 8 10 200 400 600 800

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-11
SLIDE 11

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Introduction

...or demand is just building up.

Time Demand 1 2 3 4 5 6 7 8 50 100 150 200 250 300

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-12
SLIDE 12

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Problems

  • Products can change their characteristics;
  • Croston / TSB are based on SES.

Overall:

  • 1. We need a model that could switch between intermittent /

non-intermittent regimes;

  • 2. We may need trend and / or seasonality;
  • 3. We need to apply that model to a wide variety of data.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-13
SLIDE 13

Intermittent state-space model (iSS)

slide-14
SLIDE 14

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Intermittent state-space model

The model is based on the original idea of Croston (1972): yt = otzt, (2) where ot ∼ Bernoulli(pt) and zt is a statistical model of our choice. zt can be ETS, ARIMA, regression, diffusion model, etc.

  • t = 1 means that there is a sale. ot = 0 means no sale today.

If ot = 1, for all t, then this is non-intermittent model.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-15
SLIDE 15

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

General state-space (based on Hyndman et al. (2008))

General state-space model for iETS: yt = ot (w(vt−1) + r(vt−1, ǫt)) vt = f(vt−1) + g(vt−1, ǫt) . (3) vt is the vector of states, w is the measurement function, f is the transition function, g is the persistence function, where ot ∼ Bernoulli(pt) and ǫt is the error term.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-16
SLIDE 16

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Intermittent state-space model

Multiplicative model is preferred (paper submitted to IJF).

  • Example. iETS(M,N,N) with time varying probability:

yt = otzt zt = lt−1(1 + ǫt) lt = lt−1(1 + αǫt) , (4) 1 + ǫt ∼ logN(0, σ2), which means that zt is always positive. States are updated on every observation (potential demand). But sales happen only when ot = 1. Underlies SES, when ot = 1.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-17
SLIDE 17

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

How to model the probability?

pt has a statistical model of its own. So far we have developed three models for pt:

  • Fixed probability model;

pt = p for all t.

  • Croston’s model;

pt =

1 1+qt , where qt is ETS(M,N,N).

  • TSB model.

pt ∼ Beta(at, bt), where at and bt are ETS(M,N,N).

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-18
SLIDE 18

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Examples

iETS(M,N,N) with fixed probability...

iETS(MNN)

2 4 6 8 10 20 40 60 80

Series Fitted values Point forecast 95% prediction interval Forecast origin

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-19
SLIDE 19

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Examples

Fixed probability.

iSS, Fixed probability

2 4 6 8 10 0.0 0.2 0.4 0.6 0.8 1.0

Series Fitted values Point forecast Forecast origin

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-20
SLIDE 20

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Examples

iETS(M,Md,N) with TSB and demand becoming obsolete

iETS(MMdN)

2 4 6 8 10 12 200 400 600 800

Series Fitted values Point forecast 95% prediction interval Forecast origin

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-21
SLIDE 21

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Examples

Time varying probability, TSB style.

iSS, TSB

2 4 6 8 10 12 0.0 0.2 0.4 0.6 0.8 1.0

Series Fitted values Point forecast Forecast origin

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-22
SLIDE 22

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Examples

iETS(M,N,N) with Croston and building up level of demand...

iETS(MNN)

2 4 6 8 100 200 300 400 500 600

Series Fitted values Point forecast 95% prediction interval Forecast origin

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-23
SLIDE 23

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Examples

Time varying probability, Croston’s style.

iSS, Croston

2 4 6 8 0.0 0.2 0.4 0.6 0.8 1.0

Series Fitted values Point forecast Forecast origin

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-24
SLIDE 24

Model selection in iSS

slide-25
SLIDE 25

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Model selection

Selection can be done in several directions:

  • 1. zt – select the best ETS model (error / trend / seasonality);
  • 2. pt – select the best model between Fixed / Croston / TSB;
  • 3. pt – select the best ETS model for Croston / TSB.

Here we discuss only (1) and (2).

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-26
SLIDE 26

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Model selection

Concentrated log-ikelihood function for iETS model: ℓ(θ, ˆ σ2

z|Y) =

−T1 2

  • log(2πe) + log(ˆ

σ2

z)

  • t=1

log(zt) +

  • t=1

log(ˆ pt) +

  • t=0

log(1 − ˆ pt) , (5) θ is the vector of the parameters, σ2

z is the variance of the residuals of demand sizes,

Y is the vector of actual values, T1 number of observations of non-zero demand.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-27
SLIDE 27

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Model selection

The selection can be done using AIC, AICc, BIC etc. e.g. calculating AIC: AIC = 2k − 2ℓ(θ, σ2|Y), (6) where k is the number of parameters in the model,

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-28
SLIDE 28

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Model selection

We need to know the number of parameters. It is easy for the models for zt: k = smoothing parameters + initial states + 1 + i. i is equal to one if ot = 1 for any t. This is because we split the data in two parts:

  • 1. zt – demand sizes;
  • 2. ot – demand occurrences.

We estimate ˆ pt on a separate time series and use it in likelihood.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-29
SLIDE 29

Experiments

slide-30
SLIDE 30

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Data

  • WF Wholesale data (Johnston et al., 1999);
  • Daily data with working days only;
  • One year – 248 observations;
  • 120 branches, around 600 SKUs;
  • Some series have negative values;
  • Excluded series with less than 5 non-zero observations;
  • Excluded data with no variability;
  • We aggregated SKU for all branches to have non-intermittent

data;

  • Overall – 10221 time series.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-31
SLIDE 31

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Contestants

  • iETS(Z,Z,N);
  • ETS(A,N,N);
  • Croston;
  • TSB;
  • Naive;
  • Zeroes.

es() function from smooth package for R (from CRAN) for all.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-32
SLIDE 32

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Error measures

  • sMSE - Mean Squared Error;
  • MREb - Mean Root Error bias;
  • sPIS - Periods-in-stock;
  • sCE - Cumulative Error;
  • PLS - Prediction Likelihood Score;
  • Prediction intervals coverage (distance from 95%).

Other settings

  • Horizon of 20 days (one month);
  • Fixed origin.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-33
SLIDE 33

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Results

Model MREb sMSE sPIS sCE PLS PI iETS(ZZN)

  • 0.640

0.550

  • 5.014
  • 0.535
  • 15.621

0.070 ETS(ANN)

  • 0.686

0.547

  • 2.141
  • 0.263
  • 114.62

0.040 Croston

  • 0.746

0.556 8.616 0.761

  • 19.627

0.072 TSB

  • 0.677

0.547

  • 2.502
  • 0.298
  • 18.033

0.120 Naive 0.837 0.761

  • 2.853
  • 0.331
  • 95.841

0.049 Zeroes 0.979 0.578

  • 21.746
  • 2.131
  • 113.343

0.040

Table: Mean Error measures.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-34
SLIDE 34

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Results

Model MREb sMSE sPIS sCE PLS PI iETS(ZZN)

  • 0.753

0.018 3.343 0.241

  • 7.338

0.050 ETS(ANN)

  • 0.787

0.020 5.373 0.478

  • 42.811

0.050 Croston

  • 0.850

0.031 11.41 1.026

  • 8.120

0.050 TSB

  • 0.781

0.019 5.018 0.466

  • 7.713

0.050 Naive 1.000 0.020

  • 2.131
  • 0.345
  • 50.179

0.050 Zeroes 1.000 0.015

  • 4.100
  • 0.571
  • 43.038

0.050

Table: Median Error measures.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-35
SLIDE 35

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Nemenyi test (Demˇ sar, 2006) on sMSE and PLS

iETS(ZZN) − 3.08 TSB − 3.29 ETS(ANN) − 3.35 Zeroes − 3.48 Naive − 3.56 Croston − 4.23 iETS(ZZN) − 1.98 TSB − 2.23 Croston − 2.85 ETS(ANN) − 4.11 Zeroes − 4.15 Naive − 5.68

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-36
SLIDE 36

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Nemenyi test on absolute sPIS and Coverage

Zeroes − 3.20 TSB − 3.22 iETS(ZZN) − 3.22 Naive − 3.29 ETS(ANN) − 3.64 Croston − 4.44 Zeroes − 3.30 ETS(ANN) − 3.30 iETS(ZZN) − 3.37 Croston − 3.54 TSB − 3.59 Naive − 3.89

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-37
SLIDE 37

Conclusions

slide-38
SLIDE 38

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Conclusions

  • Connection between intermittent and conventional models;
  • We can use one model for wide variety of series;
  • Categorisation based on modelling approach;
  • Good results on real data;
  • But the experiment needs to be extended.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-39
SLIDE 39

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Future experiments

  • Add Bootstrap to the list of competitors;
  • Another dataset (more heterogeneous).

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-40
SLIDE 40

Finale

Thank you for your attention!

Ivan Svetunkov i.svetunkov@lancaster.ac.uk

Lancaster Centre for

Forecasting

slide-41
SLIDE 41

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Croston, J. D., sep 1972. Forecasting and Stock Control for Intermittent Demands. Operational Research Quarterly (1970-1977) 23 (3), 289. URL http://www.jstor.org/stable/3007885?origin=crossref Demˇ sar, J., 2006. Statistical Comparisons of Classifiers over Multiple Data Sets. Journal of Machine Learning Research 7, 1–30. Hyndman, R. J., Koehler, A. B., Ord, J. K., Snyder, R. D., 2008. Forecasting with Exponential Smoothing. Springer Series in

  • Statistics. Springer Berlin Heidelberg, Berlin, Heidelberg.

URL http://link.springer.com/10.1007/978-3-540-71918-2 Johnston, F. R., Boylan, J. E., jan 1996. Forecasting for Items with Intermittent Demand. Journal of the Operational Research Society 47 (1), 113–121. URL http://link.springer.com/10.1057/jors.1996.10

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-42
SLIDE 42

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

Johnston, F. R., Boylan, J. E., Meadows, M., Shale, E., dec 1999. Some Properties of a Simple Moving Average when Applied to Forecasting a Time Series. The Journal of the Operational Research Society 50 (12), 1267–1271. URL http://wrap.warwick.ac.uk/13847/http: //www.jstor.org/stable/3010636?origin=crossref Petropoulos, F., Kourentzes, N., jun 2015. Forecast combinations for intermittent demand. Journal of the Operational Research Society 66 (6), 914–924. URL http://dx.doi.org/10.1057/jors.2014. 62{%}7B{%}25{%}7D5Cn10.1057/jors.2014.62http: //link.springer.com/10.1057/jors.2014.62 Prestwich, S., Tarim, S., Rossi, R., Hnich, B., oct 2014. Forecasting intermittent demand by hyperbolic-exponential

  • smoothing. International Journal of Forecasting 30 (4), 928–933.

URL http://dx.doi.org/10.1016/j.ijforecast.2014.01.

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model

slide-43
SLIDE 43

LC F Introduction Intermittent state-space model Model selection Experiments Finale References

006http://linkinghub.elsevier.com/retrieve/pii/ S0169207014000491 Syntetos, A. A., Boylan, J. E., apr 2005. The accuracy of intermittent demand estimates. International Journal of Forecasting 21 (2), 303–314. URL http://linkinghub.elsevier.com/retrieve/pii/ S0925527310002306http://linkinghub.elsevier.com/ retrieve/pii/S0169207004000792 Syntetos, A. A., Boylan, J. E., Croston, J. D., 2005. On the categorization of demand patterns. Journal of the Operational Research Society 56 (5), 495–503. Teunter, R. H., Syntetos, A. A., Babai, M. Z., nov 2011. Intermittent demand: Linking forecasting to inventory

  • bsolescence. European Journal of Operational Research

214 (3), 606–615. URL http://linkinghub.elsevier.com/retrieve/pii/ S0377221711004437

Ivan Svetunkov and John Boylan LCF One for all: forecasting intermittent and non-intermittent demand using one model