Forecasting with Multiple Temporal Aggregations.
Forecasting with Multiple Temporal Aggregations. Part 2: Introduction to Temporal Aggregations and … MAPA.

In the first Part of this series (Check it here), I talked about the motivation behind Multiple Temporal Aggregations (MTAs). In particular, I talked about uncertainty in forecasting and the different sources it originates from. Then, I gave a brief introduction to Forecast Combinations, the benefits, and how to effectively use them in practice. In this second part, I will introduce MTAs and talk about the first forecasting method that effectively applied them in practice.
Let's begin :).
The Intuition Behind Multiple Temporal Aggregations
“How do we come up with diverse forecasts while ensuring they are not inaccurate?”
That was the question that concluded Part 1. If you haven’t read it yet please do. Oke, Let’s keep this question in mind for now, and close our big parenthesis regarding forecast combinations. We will reach the answer to this question later in this article. Our initial problem was to identify the optimal frequency to model our time series.
Yes, this is how we started.
Unfortunately, no one guarantees that for a time series, the originally provided sampling frequency is the “best” to fit our model. I will try to provide a visual example. Consider the two time series in Figure 1. I will refer to them as Time Series 1 and Time Series 2 respectively.
It can easily be pointed out that Time Series 1 is clearly “heavy” on trend, while on Time Series 2, seasonality dominates. Suppose you want to produce forecasts for these two time series. In my case, I pick the Exponential Smoothing (ETS) model because (for now) I just like it a lot. After picking the model, I have to select its structural parameters. In the case of ETS we have the type of error (E), trend (T), and seasonality (S). I will trust theory over my judgment and pick the structural parameters through an information criterion, AICc [1].
Unsurprisingly, AICc picks ETS(AAN) for Time Series 1 and ETS(AAA) for Time Series 2. That is Additive Errors and Trend for Time Series 1 and Additive Error, Trend, and Seasonality for Time Series 2. The second time series shows seasonal patterns, thus we need a formulation to deal with these. This is not the case for Time Series 1 where we rely on the other components responsible for the level and the trend.
Now let’s make things interesting with a plot twist.
Time Series 1 and 2 are actually not as different as they appear to be. In fact, they are the same time series. They are just observed from a different point of view. The second Time Series is the originally provided data, sampled at monthly intervals. Time Series 1 is constructed through non-overlapping annual temporal aggregations (non-overlapping sums of 12 consecutive observations). In simple terms, it is just Time Series 2 aggregated to yearly frequency. For simplicity, we will replace indexers 1 and 2 with the numerical frequency of each time series. That means y_1 for Time Series 1, and y_12 for Time Series 2 (12 months per year). A question that can be raised here: Is there a reason we considered annual temporal aggregations? Why can’t we have temporal aggregations of 2, 3, 4, or 6 months?
Well, who said we can’t? Figure 2 shows 6 different levels built through temporal aggregations with different steps. What we observe is that using temporal aggregations to move to higher levels works as a moving average filter. Outliers, spikes, and level shifts are smoothly being filtered out. As expected, that’s also true for noise. We also note that features such as seasonality are more dominant on the lower levels (with higher frequencies). On the upper levels (with lower frequencies), seasonality and noise are filtered out allowing for the trend to be easily observed.
Now let’s rethink our initial question. How to pick the right level to produce a forecast. How to select “how much” seasonality or trend is the best to approximate the given time series. How much noise should we filter out while not avoiding the shrinkage of components such as seasonality or peaks and spikes? For simplicity, if we assume that ETS is the “best” model for our scenario, which are the “best” parameters to select?
I am sorry to spoil the fun one more time, but we can’t identify the “best” level. Theoretically, we do not know which is the optimal frequency to model our time series and auto-fit our precious ETS models. The only way to learn the “optimal” level is to know the full data generation process. Well, in that case, we would not need extra levels right? Forecasting would be a trivial task. Just extrapolate the data-generating process. This situation reminds me of something we talked about before. What do we do when we don’t know which selection to make?
We combine!!!
And voila, this is the main idea behind using MTAs. By considering multiple views of the same time series we do not rely entirely on a single forecasting level. Models fitted on the lower aggregation levels can focus on high-frequency components (e.g. seasonality), while models on higher levels can more accurately capture components that might not be so visible on the higher frequencies (e.g. trend). In addition, as mentioned in Part 1, combining diverse predictions enhances forecast combinations.
We now have a robust and reproducible way of building forecasts carrying diverse information. And this is the answer to the concluding question of Part 1. In the next section, I will briefly explain how to combine the forecasts from the different levels.
“This coffee tastes MAPA. I will have a beer instead.“
The Multiple Aggregation Prediction Algorithm (MAPA)
The idea of combining the gains of both forecast combinations and Multiple Temporal Aggregations was first framed in [2]. The authors were the first to empirically show the accuracy benefits of emphasizing on different temporal aggregation levels to highlight/shade different structural components. To increase the hype, at the time of writing, the proposed Multiple Aggregation Prediction Algorithm (MAPA) was the first method after almost 15 years to improve the results of the M3 competition (Yeah, that was kind of big at that moment). Most interestingly though, after plenty of papers on MTAs (and forecast combinations in general), the ideas that originated in the original MAPA paper are still extremely relevant. Bonus point, if you are into acronyms, Greek people use the word MAPA to refer to something awful and terrible (eg. This coffee tastes “mapa”. I will have a beer instead).
Enough acronym chit-chat. Let’s jump into the logic behind MAPA.
The proposed methodology is pretty straightforward and can be split into 3 separate steps. The aggregation step, the forecasting step, and the combination step. Figure 3 gives an overview of the complete framework. In the first step, the given time series is aggregated into multiple levels using consecutive nonoverlapping temporal aggregations. As mentioned, each level strengthens or weakens a specific component of the time series. This facilitates the identification and parameter estimation for the different forecasting models. In the second step, an independent ETS model is fitted to each temporal level. Remember the example where I picked ETS for Time Series 1 and 2? It was not random at all. The Exponential Smoothing family of methods is pretty robust to different types of time series. And that’s regardless of the strength of the trend or the seasonal component. In simple words, an ETS with the correct structural parameters can be used to adequately forecast time series with different characteristics.
In the final step, the components of the individual ETS models are extracted and combined to produce the final forecast.
Oke, this might create a bit of ambiguity here.
Why combine components and not forecasts? Let me explain this last step in some more detail. In general, when fitting an ETS model under its state space formulation, every component is modeled in a state vector. By component, I refer to the level, the trend, and the seasonality of the given series (don't forget the error term). The different components interact with each other in either an additive or multiplicative way to produce the final forecast. And that’s all for ETS. For a more detailed description readers are referred to the exceptional work of Hyndman et al [3].
Back to MAPA. As mentioned, contrary to the usual forecast combination approaches, the authors propose using simple estimators to combine the different state vectors for each level. I have already talked about the usefulness of simple estimators like the mean or median in Part 1. MAPA is a fine example of their potential. However, since combining components is not a trivial concept to grasp, I will try to illustrate the author’s intuition with a simple visual example.
Figure 4 shows three of the six temporal levels presented in Figure 2. In particular, I picked the lower level, the median, and the top. I have also extracted the trend and the seasonality of each time series using STL decomposition [4]. With a quick glimpse, we notice that the seasonality weakens as we move to the higher aggregation levels. On the top, it is completely filtered out. This is not the case with the trend. Despite that it is slightly more “clean” on the top level, the generic patterns remain the same across all levels. If we fit an ETS to each temporal level, models on the higher levels will start “paying less attention” to the original seasonality over the original trend. Equally combining forecasts that rely more on specific components over others sounds a bit biased. The final forecast will be more trend-heavy and seasonality will be shrunk. Instead, the authors argue that the seasonal component should only be combined on the levels that it is clearly present. The same is true for the other components.
And that’s the intuition behind combing state space vectors over forecasts.
The combined components are then subsequently joined to produce the final forecasts. Well, of course, it’s not simple as it sounds. The authors use a few more tricks to optimize the combinations between the various levels. I highly suggest giving the original paper a good read.
Now that we understand how MAPA works, the next question is why. Why should we consider this three-step approach instead of simply fitting an ETS on the bottom level?
The answer to this question has been given in Part 1. MAPA uses principles from forecast combinations. Empirical and theoretical evidence from over 50 years point to their benefits. Simply said, we don’t rely on a single model that might have been misidentified. Hence, model uncertainty is mitigated. Also, we have mentioned that forecast combinations excel when diverse predictions are combined. As shown, through MTA we can construct multiple and diverse time series that highlight different components. MAPA can be viewed as the initial tool to combine these levels. And from my perspective, this is the biggest contribution behind the algorithm. The performance of MAPA shows that MTAs can, and (as with all things in life) when appropriate, should be considered for forecasting. Extensions of MAPA include the incorporation of exogenous variables [6] and its application on intermittent time series with evidence pointing out that it can be very beneficial [5].
Ok, cool stuff. Let’s use MAPA everywhere then since it solves all our problems.
Well, no. I am sorry but MAPA is not optimal. Using MTAs is not restricted to simply combining components of ETS models. It just sounds pretty restrictive and ad-hoc right? There are so many forecasting models out there that we can combine with so many different combinations of weights. What about judgemental forecasts? What about global models? What about this fancy new Deep Learning architecture I read about the other day that outperforms ETS by 300%? And at the end of the day who guarantees that ETS does not produce harmful base predictions affecting the combinations?
Yes, ok I get it. But let’s make the complaints formal. Why should we combine state vectors (implemented on a specific family of models) rather than having a general combination framework backed up with strong mathematical foundations? MAPA lacks a good theoretical background and that is its biggest limitation.
Despite the drawbacks, MAPA was welcomed with excitement by the forecasting community. The novel methodology of incorporating MTAs in a forecasting pipeline created new research directions. Eventually, it resulted in the concept of Temporal Hierarchies and THieF (Temporal Hierarchies Forecasting). THieF is a theoretically stable framework for forecasting using MTA and is based on Hierarchical Forecasting. It will be the topic of the next post. To conclude Part 2, I tried to provide a brief introduction to the concept of MTA. I also wanted to describe the ideas behind the initial methodology that successfully incorporated it for forecasting.
If I am allowed to add my honest personal opinion: MAPAs ideas are still very relevant today. Merging these with the recent advances in other forecasting areas shows very high potential. Combining diverse forecasts using simple estimators is often a much more promising approach than sophisticated weighted combination methods. And this is perfectly highlighted in the performance of MAPA. The algorithm still outperforms much more complex models in various applications making it a very tough-to-beat benchmark. In the next Part, I will talk about the next, very important chapter of Multiple Temporal Aggregations, THieF.
Happy Forecasting!
References
[1] Hyndman, R.J., & Athanasopoulos, G. (2018) Forecasting: principles and practice, 2nd edition, OTexts: Melbourne, Australia. OTexts.com/fpp2
[2] Kourentzes, N., Petropoulos, F. & Trapero, J. R. (2014), ‘Improving forecasting by estimating time series structural components across multiple frequencies’, International Journal of Forecasting 30(2), 291–302.
[3] Hyndman, R., Koehler, A., Ord, K. & Snyder, R. (2008), ‘Forecasting with Exponential Smoothing — The State Space Approach | Robin Hyndman | Springer’.
[4] Cleveland, R. B., Cleveland, W. S., McRae, J. E., & Terpenning, I. (1990). STL: A seasonal-trend decomposition. J. Off. Stat, 6(1), 3–73.
[5] Petropoulos, F., & Kourentzes, N. (2015). Forecast combinations for intermittent demand. Journal of the Operational Research Society, 66(6), 914–924.
[6] Kourentzes, N., & Petropoulos, F. (2016). Forecasting with multivariate temporal aggregation: The case of promotional modelling. International Journal of Production Economics, 181, 145–153.