Understand Cross-sectional vs Temporal Hierarchies
mainHierarchical forecasting ensures coherence between different levels of time series. There are two main types of hierarchies:
- Cross-sectional hierarchies: Reconcile aggregations across different groups (e.g., product demand $\rightarrow$ product group $\rightarrow$ department $\rightarrow$ store). This uses a summation matrix $S$ and a contribution matrix $P$ to find optimal reconciled forecasts $\tilde{\textbf{Y}}$.
- Temporal hierarchies: Reconcile aggregations across different time granularities (e.g., daily $\rightarrow$ weekly $\rightarrow$ monthly). This uses a temporal summation matrix $S_{te}$ and a temporal contribution matrix $P_{te}$.
Cross-temporal reconciliation is achieved by performing cross-sectional reconciliation followed by temporal reconciliation in a two-step procedure.