HINT
The Hierarchical Mixture Networks (HINT) are a highly modular framework that combines SoTA neural forecast architectures with task-specialized mixture probability and advanced hierarchical reconciliation strategies. This powerful combination allows HINT to produce accurate and coherent probabilistic forecasts.
HINT’s incorporates a TemporalNorm
module into any neural forecast
architecture, the module normalizes inputs into the network’s
non-linearities operating range and recomposes its output’s scales
through a global skip connection, improving accuracy and training
robustness. HINT ensures the forecast coherence via bootstrap sample
reconciliation that restores the aggregation constraints into its base
samples.
References
- Kin G. Olivares, David Luo, Cristian Challu,
Stefania La Vattiata, Max Mergenthaler, Artur Dubrawski (2023). “HINT:
Hierarchical Mixture Networks For Coherent Probabilistic Forecasting”.
Neural Information Processing Systems, submitted. Working Paper version
available at arxiv.
- Kin G.
Olivares, O. Nganba Meetei, Ruijun Ma, Rohan Reddy, Mengfei Cao, Lee
Dicker (2022).”Probabilistic Hierarchical Forecasting with Deep Poisson
Mixtures”. International Journal Forecasting, accepted paper available
at arxiv.
- Kin G. Olivares,
Federico Garza, David Luo, Cristian Challu, Max Mergenthaler, Souhaib
Ben Taieb, Shanika Wickramasuriya, and Artur Dubrawski (2022).
“HierarchicalForecast: A reference framework for hierarchical
forecasting in python”. Journal of Machine Learning Research, submitted,
abs/2207.03517, 2022b.
Reconciliation Methods
source
get_identity_P
source
get_bottomup_P
*BottomUp Reconciliation Matrix.
Creates BottomUp hierarchical “projection” matrix is defined as:
Parameters:
S
: Summing matrix of size (base
, bottom
).
Returns:
P
: Reconciliation matrix of size (bottom
,
base
).
References:
- Orcutt, G.H., Watts, H.W., & Edwards, J.B.(1968).
“Data aggregation and information loss”. The American Economic Review,
58 , 773(787).*
source
get_mintrace_ols_P
*MinTraceOLS Reconciliation Matrix.
Creates MinTraceOLS reconciliation matrix as proposed by Wickramasuriya et al.
Parameters:
S
: Summing matrix of size (base
, bottom
).
Returns:
P
: Reconciliation matrix of size (bottom
,
base
).
source
get_mintrace_wls_P
*MinTraceOLS Reconciliation Matrix.
Creates MinTraceOLS reconciliation matrix as proposed by Wickramasuriya et al. Depending on a weighted GLS estimator and an estimator of the covariance matrix of the coherency errors .
Parameters:
S
: Summing matrix of size (base
, bottom
).
Returns:
P
: Reconciliation matrix of size (bottom
,
base
).
HINT
source
HINT
*HINT
The Hierarchical Mixture Networks (HINT) are a highly modular framework that combines SoTA neural forecast architectures with a task-specialized mixture probability and advanced hierarchical reconciliation strategies. This powerful combination allows HINT to produce accurate and coherent probabilistic forecasts.
HINT’s incorporates a TemporalNorm
module into any neural forecast
architecture, the module normalizes inputs into the network’s
non-linearities operating range and recomposes its output’s scales
through a global skip connection, improving accuracy and training
robustness. HINT ensures the forecast coherence via bootstrap sample
reconciliation that restores the aggregation constraints into its base
samples.
Available reconciliations:
- BottomUp
- MinTraceOLS
-
MinTraceWLS
- Identity
Parameters:
h
: int, Forecast horizon.
model
:
NeuralForecast model, instantiated model class from architecture
collection.
S
: np.ndarray, dumming matrix of size (base
, bottom
) see
HierarchicalForecast’s aggregate
method.
reconciliation
: str, HINT’s reconciliation method from [‘BottomUp’,
‘MinTraceOLS’, ‘MinTraceWLS’].
alias
: str, optional, Custom name
of the model.
*
source
HINT.fit
*HINT.fit
HINT trains on the entire hierarchical dataset, by minimizing a
composite log likelihood objective. HINT framework integrates
TemporalNorm
into the neural forecast architecture for a
scale-decoupled optimization that robustifies cross-learning the
hierachy’s series scales.
Parameters:
dataset
: NeuralForecast’s
TimeSeriesDataset
see details
here
val_size
: int, size of the validation set, (default 0).
test_size
: int, size of the test set, (default 0).
random_seed
:
int, random seed for the prediction.
Returns:
self
: A fitted base
NeuralForecast
model.
*
source
HINT.predict
*HINT.predict
After fitting a base model on the entire hierarchical dataset. HINT restores the hierarchical aggregation constraints using bootstrapped sample reconciliation.
Parameters:
dataset
: NeuralForecast’s
TimeSeriesDataset
see details
here
step_size
: int, steps between sequential predictions, (default 1).
random_seed
: int, random seed for the prediction.
**data_kwarg
:
additional parameters for the dataset module.
Returns:
y_hat
: numpy predictions of the
NeuralForecast
model.
*
Usage Example
In this example we will use HINT for the hierarchical forecast task, a multivariate regression problem with aggregation constraints. The aggregation constraints can be compactcly represented by the summing matrix , the Figure belows shows an example.
In this example we will make coherent predictions for the TourismL dataset.
Outline
1. Import packages
2. Load hierarchical dataset
3.
Fit and Predict HINT
4. Forecast Plot