# Conditional Temporal Aggregation for Time Series Forecasting Using Feature-Based Meta-Learning
## 2 Literature Review
### Temporal Hierarchies  
[PERSON] et al. [13] introduced a novel approach on multiple temporal aggregation which resembles a hierarchical forecasting framework. The approach, called temporal hierarchies, enables the use of well-established reconciliation methods within the temporal dimension of the data, thus facilitating the combination of base forecasts, while ensuring coherence. [PERSON] et al. [22] used temporal hierarchies to obtain reconciled probabilistic forecasts, while [PERSON] et al. [20] proposed extensions of the framework to reduce forecast bias, avoid seasonal shrinkage, and tackle model uncertainty. In what follows, we present a brief but complete explanation of the temporal hierarchies method as well as the alternative estimators that can be used within the framework to reconcile the base forecasts. Without loss of generality, in our discussion, we consider quarterly data (\(m=4\)) as the temporal level at which the time series is originally observed and denote it using the \(m\)-dimensional vector \(\mathbf{b}=(\mathbf{y}_{Q_{1}},\mathbf{y}_{Q_{2}},\mathbf{y}_{Q_{3}},\mathbf{ y}_{Q_{4}})^{\prime}\). Semi-annual and annual data can then be constructed by using non-overlapping temporal aggregation. The temporal hierarchy in this case is structured as shown in Figure 2.  
Temporal hierarchies assume that any observation at an aggregate level should be equal to the sum of the observations of its respective sub-aggregate level. Since the temporal hierarchy consists of \(r=7\) nodes, the \(r\)-dimensional vector \(\mathbf{y}=(\mathbf{y}_{A},\mathbf{y}_{SA_{1}},\mathbf{y}_{SA_{2}},\mathbf{y}_ {Q_{1}},\mathbf{y}_{Q_{2}},\mathbf{y}_{Q_{3}},\mathbf{y}_{Q_{4}})^{\prime}\), involving the observations of the temporally aggregated series, can be organized as follows  
\[\mathbf{y}=\mathbf{Sb}, \tag{1}\]  
Figure 2: A temporal hierarchy for quarterly data. where  
\[\mathbf{S}= \begin{bmatrix}1&1&1&1\\ 1&1&0&0\\ 0&0&1&1\\ \mathbf{I}_{m}&\end{bmatrix}  \tag{2}\]  
is a \"summing matrix\" of order \(r\times m\), while \(\mathbf{I}_{m}\) is a \(m\)-dimensional identity matrix. Based on the above, reconciled forecasts can be derived by  
\[\tilde{\mathbf{y}}=\mathbf{SP}\hat{\mathbf{y}}, \tag{3}\]  
where \(\hat{\mathbf{y}}\) are the base forecasts, \(\hat{\mathbf{y}}\) are the revised hierarchical forecasts, and \(\mathbf{P}\) is a \(m\times n\) matrix that combines the base forecasts. Effectively, \(\mathbf{SP}\) forms a reconciliation matrix that transforms incoherent base forecasts across all aggregation levels into reconciled ones using the combinations weights defined by \(\mathbf{P}\). Note that as long as \(\mathbf{P}\) has non-zero values in each column, the revised forecasts are calculated using base forecasts from all aggregation levels. Setting a column to zero will negate the effect of the corresponding level's base forecasts. For instance, in the case of the quarterly data, if we set every column to zero except those that correspond to the quarterly base forecasts, the reconciled forecasts will be solely extracted from the bottom-level forecasts of the temporal hierarchy. Similarly, if we zero out all columns except the first, the reconciled forecasts will be solely driven by the annual base forecasts. [PERSON] et al. (2018) investigated the optimization of the \(\mathbf{P}\) matrix, proving that if \(\mathbf{W}\) is a positive definite covariance matrix of the base forecast errors, then \(\mathbf{P}=(\mathbf{S}^{\prime}\mathbf{W}^{-1}\mathbf{S})^{-1}\mathbf{S}^{ \prime}\mathbf{W}^{-1}\) minimizes the \(tr[\mathbf{SPWP}^{\prime}\mathbf{S}^{\prime}]\), subject to \(\mathbf{S}\mathbf{S}=\mathbf{S}\), where \(\mathbf{SPWP}^{\prime}\mathbf{S}^{\prime}=var(\mathbf{y}-\hat{\mathbf{y}})\) is the variance covariance matrix of the \(h\)-step ahead coherent forecast errors. The method, called \"MinT\", minimizes the trace of the covariance of the \(h\)-step ahead coherent forecast errors, being limited, however, by the need of knowledge of the \(\mathbf{W}\) matrix. [PERSON] et al. (2018) and [PERSON] et al.