Hierarchical Forecast
This notebook offers a step by step guide to create a hierarchical forecasting pipeline.
In the pipeline we will use
NeuralForecast
and
HINT
class, to create fit, predict and reconcile forecasts.
We will use the TourismL dataset that summarizes large Australian national visitor survey.
Outline
1. Installing packages
2. Load hierarchical dataset
3. Fit and Predict HINT
4. Forecast Evaluation
You can run these experiments using GPU with Google Colab.
1. Installing packages
2. Load hierarchical dataset
This detailed Australian Tourism Dataset comes from the National Visitor Survey, managed by the Tourism Research Australia, it is composed of 555 monthly series from 1998 to 2016, it is organized geographically, and purpose of travel. The natural geographical hierarchy comprises seven states, divided further in 27 zones and 76 regions. The purpose of travel categories are holiday, visiting friends and relatives (VFR), business and other. The MinT (Wickramasuriya et al., 2019), among other hierarchical forecasting studies has used the dataset it in the past. The dataset can be accessed in the MinT reconciliation webpage, although other sources are available.
Geographical Division | Number of series per division | Number of series per purpose | Total |
---|---|---|---|
Australia | 1 | 4 | 5 |
States | 7 | 28 | 35 |
Zones | 27 | 108 | 135 |
Regions | 76 | 304 | 380 |
Total | 111 | 444 | 555 |
Mathematically a hierarchical multivariate time series can be denoted by the vector defined by the following aggregation constraint:
where are the aggregate series, are the bottom level series and are the hierarchical aggregation constraints.
3. Fit and Predict HINT
The Hierarchical Forecast Network (HINT) combines into an easy to use
model three components:
1. SoTA neural forecast model.
2. An
efficient and flexible multivariate probability distribution.
3.
Builtin reconciliation capabilities.
4. Forecast Evaluation
To evaluate the coherent probabilistic predictions we use the scaled Continuous Ranked Probability Score (sCRPS), defined as follows:
As you can see the HINT model efficiently achieves state of the art accuracy under minimal tuning.
Levels | HINT | DPMN | HierE2E | ARIMA_MinTrace_B | ARIMA_BottomUp_B | ARIMA | |
---|---|---|---|---|---|---|---|
0 | Overall | 0.1178±0.0002 | 0.1249±0.0020 | 0.1472±0.0029 | 0.1313±0.0009 | 0.1375±0.0013 | 0.1416 |
1 | Country | 0.0288±0.0007 | 0.0431±0.0042 | 0.0842±0.0051 | 0.0471±0.0018 | 0.0622±0.0026 | 0.0263 |
2 | State | 0.0593±0.0004 | 0.0637±0.0032 | 0.1012±0.0029 | 0.0723±0.0011 | 0.0820±0.0019 | 0.0904 |
3 | Zone | 0.1023±0.0003 | 0.1084±0.0033 | 0.1317±0.0022 | 0.1143±0.0007 | 0.1207±0.0010 | 0.1389 |
4 | Region | 0.1451±0.0004 | 0.1554±0.0025 | 0.1705±0.0023 | 0.1591±0.0006 | 0.1646±0.0007 | 0.1878 |
5 | Country/Purpose | 0.0752±0.0006 | 0.0700±0.0038 | 0.0995±0.0061 | 0.0723±0.0014 | 0.0788±0.0018 | 0.0770 |
6 | State/Purpose | 0.1109±0.0001 | 0.1070±0.0023 | 0.1336±0.0042 | 0.1243±0.0014 | 0.1268±0.0017 | 0.1270 |
7 | Zone/Purpose | 0.1773±0.0003 | 0.1887±0.0032 | 0.1955±0.0025 | 0.1919±0.0008 | 0.1949±0.0010 | 0.2022 |
8 | Region/Purpose | 0.2438±0.0002 | 0.2629±0.0034 | 0.2615±0.0016 | 0.2694±0.0006 | 0.2698±0.0008 | 0.2834 |
References
- Kin G. Olivares, David Luo, Cristian Challu, Stefania La Vattiata,
Max Mergenthaler, Artur Dubrawski (2023). “HINT: Hierarchical
Mixture Networks For Coherent Probabilistic Forecasting”.
International Conference on Machine Learning (ICML). Workshop on
Structured Probabilistic Inference & Generative Modeling. Available
at
https://arxiv.org/abs/2305.07089.
- Kin G. Olivares, O. Nganba Meetei, Ruijun Ma, Rohan Reddy, Mengfei
Cao, Lee Dicker (2023).”Probabilistic Hierarchical Forecasting with
Deep Poisson Mixtures”. International Journal Forecasting, accepted
paper. URL
https://arxiv.org/pdf/2110.13179.pdf.
- Kin G. Olivares, Federico Garza, David Luo, Cristian Challu, Max Mergenthaler, Souhaib Ben Taieb, Shanika Wickramasuriya, and Artur Dubrawski (2023). “HierarchicalForecast: A reference framework for hierarchical forecasting”. Journal of Machine Learning Research, submitted. URL https://arxiv.org/abs/2207.03517