examining the effect of temporal aggregation on forecasting … · 2017. 4. 7. · spiliotis...
TRANSCRIPT
National Technical University of Athens- Forecasting & Strategy Unit
34th International Symposium on Forecasting Rotterdam, Netherlands – Hierarchical Time Series
Spiliotis Evangelos – Forecasting & Time Series Prediction stream
Examining the effect of temporal aggregation on forecasting accuracy for hierarchical energy consumption time series
Evangelos Spiliotis
Co-Authors: Dr. Fotios Petropoulos Dr. Nikolaos Kourentzes Prof. Vassilios Assimakopoulos
National Technical University of Athens Forecasting & Strategy Unit Lancaster University Lancaster Centre for Forecasting
©1-July-2014, Evangelos Spiliotis
A challenging problem
Hourly data (energy consumption in kWh)
Duration of ~9.5 weeks (1612 hours, from 5-Jan-12 to 12-March-12)
Data source: The monitoring systems installed in the bank branches
Bank
Branch1
HVAC1
UPS1
Lighting1
Branch2
HVAC2
UPS2
Lighting2
Branch3
HVAC3
UPS3
Lighting3
Branch4
HVAC4
UPS4
Lighting4
Branch5
HVAC5
UPS5
Lighting5
We need to forecast the electrical consumption of a Greek bank across three hierarchical levels: The bank (Lvl 0) The five branches composing it (Lvl 1) The end uses of each branch (Lvl 2): HVAC,
devices connected to UPS and Lighting
2
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
What about hierarchical aggregation? In commercial building sector, cross-sectional aggregation refers to the aggregation of multiple energy loads for the formation of
families of energy demand
Why using it? Reconciliation of forecasts Improvements on forecasting performance (maybe)
How? Hierarchical time series are commonly forecasted using:
Bottom-Up Top-Down or Optimal method (Hyndman, Ahmed, Athanasopoulos, Shang, 2011)
3
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
Why not combine with temporal aggregation?
4
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
Emphasizes different time-series characteristics by transforming the original data to alternative time frequencies
Possible gains:
Improvements on forecasting accuracy (A study on ARIMA models-Abraham, 1982)
Reduction of bias (Mohammadipour & Boylan, 2012)
MAPA (Kourentzes, Petropoulos & Trapero, 2014) is a generalized methodology for applying temporal aggregation Aggregates time series into different levels (typically up to annual data) Fits an appropriate model to each aggregation level Combines information from all models to a reconciled so that both short and
long term forecasts are performing well
5
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
Our Motivation Empirical studies have shown that temporal aggregation, and
especially MAPA, can boost the performance of forecasting in time series with characteristics similar to those of our case-study.
Proper reconciliation of forecasts can complement and reinforce our results
The combination of sub-aggregation and cross-sectional aggregation leads to better forecasts than B-U and T-D approaches individually (Tabar, Babai, Ducq & Syntetos, OR55 – 2013)
Research questions Does a combination of temporal and hierarchical aggregation lead to better forecasts? If yes, which is the contribution of each aggregation method?
Main issues in our case-study
• Capture effectively the intense seasonal pattern of the time series
• Choose an appropriate forecasting model
• Deal with the noise which becomes dominant on the low levels of the pyramid
• Remain accurate for long-term forecasts
• Manage special events & bank holidays
6
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
Capturing seasonality
We decided to use classical mean multiplicative decomposition of seasonal frequency 168 Seasonal plots (Hyndman & Athanasopoulos -2012) were provided by R: Forecast Package
7
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
Model selection for MAPA process Simple exponential smoothing: Fast moving data - no trend
Consequently, MAPA gets a simplified form
SES leads to zero trend components
A priori decomposition leads to zero seasonal components
f_MAPA = mapasimple(des_insample, ppy, fh = fh, minimumAL = 1, maximumAL = ppy, comb = "median", output = "forecast", paral = 0, display = 0, outplot = 2, hybrid = FALSE, model = "ANN")
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
8
Methodological Approach
Classical multiplicative
decomposition Frequency 168
Bank
Branches
End Uses
SES level 1
SES
SES
level 2
level k
.
.
.
Temporal Aggregated time series
level 2
Temporal Aggregated time series
level k
Average level
Seasonalization of data
Bottom-Up Optimal Top-Down
Hierarchical levels h=0,1,2 h=2 h=0 h=1
Bank Branches
End Uses
Final forecasts per hierarchical level
9
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
Experimental design 10
Accuracy evaluation through symmetric Mean Absolute Percentage error
𝑠𝑀𝐴𝑃𝐸 =1
𝑛 𝑌𝑖 − 𝐹𝑖𝑌𝑖 + 𝐹𝑖2
100(%)
𝑛
𝑖=1
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
21 time series referring to 5 bank branches and 3 end uses Forecasting horizons tested: 1 to 7 days ahead Out-of sample evaluation Rolling origin procedure was used for better evaluating the forecasts. The
procedure stops when the forecasting horizon corresponds to the last of the available sample (Tashman - 2000)
Benchmarks: Naïve 2 and SES
Bias evaluation through Mean Scaled error
𝑠𝐸𝑖,ℎ =𝑦𝑁+ℎ − 𝐹ℎ1𝑁 𝑦𝑡𝑁𝑡=1
• An accuracy scaled error metric was also used providing similar conclusions with sMAPE (naïve was set as a benchmark)
• The performance differences between MAPA and the benchmark methods were consistent across the forecasting horizons. Average performance will be presented
Accuracy Evaluation 11
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
MAPA leads to more accurate forecasts regardless the hierarchical method used Bottom-up dominates the rest of the methods whether temporal aggregation is applied
or not Lvl2 is the level mostly benefited from temporal aggregation (29%), followed by lvl1
(19%) and lvl0 (7%) This is translated to a 19%, 3% and 18% gain in B.U., T.D. and Optimal method,
respectively: The higher the gain from MAPA the better the performance after reconciling the forecasts
0% 10% 20% 30% 40% 50%
Bottom-Up
Top-Down
Optimal
Average sMAPE gains of MAPA over SES per Hierarchical Method
Level 2
Level 1
Level 0
0.00 10.00 20.00 30.00 40.00
MAPA
SES
Naïve 2
Average sMAPE of hierarchical methods per forecasting method (equal weights per level)
Average Optimal
Average T.D.
Average B.U.
Bias Evaluation
MAPA leads to less biased forecasts regardless the hierarchical method used
Bottom-up dominates the rest of the methods when temporal aggregation is applied
The bottom-up approach is highly benefited mainly due to lvl2 performance. Similarly Top-down is mostly benefited by lvl0 performance, while in Optimal approach all levels are similarly affected
12
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
-0.06 -0.04 -0.02 0.00 0.02 0.04 0.06
MAPA
SES
Naïve 2
Average sME of hierarchical methods per forecasting method (equal weights per level)
Average Optimal
Average T.D.
Average B.U.
0% 50% 100% 150% 200%
Bottom-Up
Top-Down
Optimal
Average sME gains of MAPA over SES per Hierarchical Method
Level 2
Level 1
Level 0
Summarizing our results
• The present work is a prototype of combining cross-sectional with temporal aggregation
• When MAPA forecasts are used for cross-sectional aggregation, hierarchical forecasting performance is boosted both in terms of bias and accuracy regardless the hierarchical method used
• Benefits are larger when long term forecasts are needed, or noisy data are available. This reinforces the existing findings in the literature (Kourentzes, Petropoulos & Trapero - 2014)
• If noise does not dominate in any hierarchical level, Optimal method seems to be the best choice for reorganizing forecasts across the hierarchy
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
13
Further work to be made Specify the performance gains of hybrid aggregation over simple
cross-sectional aggregation
Examine the effect of different temporal and cross-sectional combinations on forecasting accuracy and bias: Cross-sectional aggregation first and then temporal aggregation
Cross-sectional and temporal aggregation at the same time
Evaluate MAPA’s performance on very short (hour level) forecasting horizons
Modify MAPA’s algorithm is order to weight temporal components averaged based on the forecasting horizon set
34th International Symposium on Forecasting
Rotterdam, Netherlands - Hierarchical Time Series
14
References
• N. Kourentzes, F. Petropoulos, J. R. Trapero (2014). Improving forecasting by estimating time series structural components across multiple frequencies, International Journal of Forecasting, Vol. 30, pp. 291-302
• F. Petropoulos, N. Kourentzes (2014). Improving forecasting via multiple temporal aggregation, Foresight (forthcoming)
• F. Petropoulos, N. Kourentzes (2014). Forecast Combinations for Intermittent Demand, Journal of Operational Research Society (forthcoming)
• R.J. Hyndman, R.A. Ahmed, G. Athanasopoulos, H.L. Shang (2011). Optimal combination forecasts for hierarchical time series, Computational Statistics and Data Analysis, Vol. 55, pp. 2579-2589
• B. Abraham (1982). Temporal aggregation and time series, International Statistical Review, Vol. 50, pp. 285-291
• M. Mohammadipour & J.E. Boylan (2012). Forecast horizon aggregation in integer autoregressive moving average (INARMA) models, Omega, Vol. 40, issue 6, pp. 703-712
• L.J. Tashman (2000). Out-of-sample tests of forecasting accuracy: an analysis and review, International Journal of Forecasting, Vol. 16, pp. 437-450
• B.R. Tabar, M.-Z. Babai, Y. Ducq, A. Syntetos (2013). Demand forecasting by hybrid temporal and cross-sectional aggregation, OR55 conference
• G. Athanasopoulos, S. Razbash, D. Schmidt, Z. Zhou, Y. Khan, C. Bergmeir & E. Wang (2014). Forecast package for R v 5.4: Forecasting functions for time series and linear models
• N. Kourentzes & F. Petropoulos (2014). MAPA package for R v1.5: Multiple Aggregation Prediction Algorithm
34th International Symposium on Forecasting Rotterdam, Netherlands - Energy Forecasting Spiliotis
Evangelos – Forecasting & Time Series Prediction stream
15
34th International Symposium on Forecasting Rotterdam, Netherlands - Hierarchical Time Series
Thank you for your attention Any questions?
If you would like more information about our work contact me at:
Or visit forecasting & strategy unit’s website
http://www.fsu.gr
16