Download presentation

Presentation is loading. Please wait.

Published bySheila Heather Modified over 2 years ago

1
Chapter 9. Time Series From Business Intelligence Book by Vercellis Lei Chen, for COMP

2
Definitions Data: {x_i, y_i, i=1, 2…} Discrete: – x_i are discrete: day 1, day 2, … Continuous – x_i are continuous values Examples: – Quraterly employment rates (Fig 9.1) – Bimonthly electricity consumption (Fig 9.2) – Australian Wine Sales (Fig 9.3) 2

3
Prediction Predictive models – f_t is a prediction of random value Y_t for period t of the time series y_t, values of y_t, y_{t-1}, … y_t- {k+1} are known – f_{t+1}=F(y_t, y_{t-1}, … y_{t-k+1}) – Our job: Select the form of F(.) Learn the parameters of F(.) 3

4
Index Numbers Let there be r time series Let w_1, w_2, … w_r be the r weights on the time series y_{1t}, y_{2t}, … y_{rt}. Let y_t = Sum(w_i*y_{it}, i=1,..r} Let y_0 = y_t, t=0 Then, I_t = (y_t/y_0)*100 is the index of the r time series 4

5
Evaluating Time Series Prediction error at time t – e_t = y_t – f_t Percentage prediction error at time t – e_t^p = (y_t – f_t) / y_t * 100 Distortion measures – Mean Error ME = (Sum_{t=1..k}(y_t-f_t))/k – Mean Percentage Error MPE = (Sum_{t=1..k}(e_t^p))/k 5

6
Dispersion Measures (Fig 9.4) Sometimes mean error does not indicate best models – Mean error = 0 implies multiple models, some are better than others Introduce mean absolute deviation (MAD) – MAD = (Sum_{t=1..k}(|y_t-f_t|))/k – MAPE = (Sum_{t=1..k}(|e_t^p|))/k – Mean Squared Error MSE = (Sum_{t=1..k}(y_t-f_t)^2)/k – Avoid amplifying large errors Standard Deviation Errors (SDE) = SQRT(MSE) 6

7
Component Analysis Trend – Average behavior of time series over time M_t: Increasing, decreasing, stationary – Seasonality Q_t: short-term fluctuatins of regular frequency (days of week, months of year, etc.) – Random Noise White noise: _t, obtained from y_t after trend and seasonality are removed. Also known as white noise, zero mean and constant variance Y_t = g(M_t, Q_t, _t) 7

8
Moving Average (Fig 9.5) Moving Average: – m_t(h) = Average(y_t, t=1, 2, …h) Centered Moving Average – Centered on t: (range t-(h-1)/2) to from t+(h-1)/2) if h is odd – What if h is even? Adv: smoothes the data, represent the trend 8

9
Using moving average to predict f_{t+1}=f_t + y_t/h – y_{t-h}/h – f_{t+1}=Sum(y_{i=t-h+1, …t})/h – The prediction for period t+1 is equal to theprediction for period t with the addition of a corrective term, equal to 1/h times the difference between the most recent observations y_t and the observation y_{t_h}. – Used as a baseline to compare against other models 9

10
Decomposition of a Time Series A multiplicative model – Y_t = M_t * Q_t * _t Removal of trend component – B_t = Q_t * _t= Y_t/M_t represents the fluctuation around zero mean, which is better for analysis – Another method is to view D_t = Y_{t}-Y_{t-1} Trend: M_t = a+b*t which is linear regression 10

11
Exponential Smoothing Models For forecasting (Fig 9.11 and Fig 9.12) Simple exponential smoothing – s_t = a*y_t + (1-a) * s_{t-1}, s_1=y_1 – a \in [0,1] – f_{t+1}= s_t = a*[y_t + (1-a)*y_{t-1} + … (1-a)^(t-2)*y_2]+(1- a)^(t-1)*y_1 – Weights exponentially decrease as we go back in time! 11

12
More Exponential Models Exponential Smoothing with Trend Adjustment (Fig. 9.14) Besides the smoothed mean s_t, the linear smoothed trend m_t is also defined, which is a trend additive component M_t – s_t = a*y_t+(1-a)*(s_{t-1}+ m_{t-1}) – m_t = b*(s_t – s_{t-1}) + (1-b)*m_{t-1} b between 0 and 1, modulates the importance of the most recent value of the trend, expressed as the difference of the means (s_t – s_{t-1}) f_{t+1} = s_t + m_t 12

13
Other models Exponential smoothing with trend and seasonality Simple Adaptive Exponential Smoothing Exponential Smoothing with Damping Trend 13

14
Autoregressive Models AR(p) of order p – Y_t = + f_1*Y_{t-1}+f_2*Y_{t-2} + … f_p*Y_{t-p} + _t (noise), – Prediction f_{t+1}= = + f_1*Y_{t}+f_2*Y_{t-1} + … f_p*Y_{t-p+1} 14

15
Moving Average Models Look back q points, minimize sum of squared errors: – Y_t = + _t – Sum( _i * E_{t-i}), i=1,.. q – f_{t+1} = – Sum( _i * E_{t-i+1}), i=1,.. q 15

16
Autoregressive Moving Average (ARMA) Models ARMA(p,q) Looks back p, q points, respectively: – Y_t = + _t +Sum( _i * Y_{t-i})– Sum( _j * E_{t- j}), i=1,.. p, j=1,…q. – f_{t+1} = +Sum( _i * Y_{t-i+1})– Sum( _i * E_{t- i+1}), i=1,.. p, j=1, … q. 16

17
Autoregressive Moving Average (ARMA) Models ARMA(p,q) Looks back p, q points, respectively: – Y_t = + _t +Sum( _i * Y_{t-i})– Sum( _j * E_{t- j}), i=1,.. p, j=1,…q. – f_{t+1} = +Sum( _i * Y_{t-i+1})– Sum( _i * E_{t- i+1}), i=1,.. p, j=1, … q. ARIMA models of order p and q: modeling A_t = Diff(Y_t, h)=Y_t – Y_{t-h} 17

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google