Skip to main content
Here we provide a collection of methods designed to provide hierarchically coherent probabilistic distributions, which means that they generate samples of multivariate time series with hierarchical linear constraints. We designed these methods to extend the core.HierarchicalForecast capabilities class. Check their usage example here.

1. Normality

Normality

Normality Probabilistic Reconciliation Class. The Normality method leverages the Gaussian Distribution linearity, to generate hierarchically coherent prediction distributions. This class is meant to be used as the sampler input as other HierarchicalForecast reconciliation classes. Given base forecasts under a normal distribution: y^h∼N(μ^,W^h)\hat{y}_{h} \sim \mathrm{N}(\hat{\boldsymbol{\mu}}, \hat{\mathbf{W}}_{h}) The reconciled forecasts are also normally distributed: y~h∼N(SPμ^,SPW^hP⊺S⊺)\tilde{y}_{h} \sim \mathrm{N}(\mathbf{S}\mathbf{P}\hat{\boldsymbol{\mu}}, \mathbf{S}\mathbf{P}\hat{\mathbf{W}}_{h} \mathbf{P}^{\intercal} \mathbf{S}^{\intercal}) Parameters: Raises: Warns: Examples:

Normality.get_samples

Normality Coherent Samples. Obtains coherent samples under the Normality assumptions. Parameters: Returns:

2. Bootstrap

Bootstrap

Bootstrap Probabilistic Reconciliation Class. This method goes beyond the normality assumption for the base forecasts, the technique simulates future sample paths and uses them to generate base sample paths that are latered reconciled. This clever idea and its simplicity allows to generate coherent bootstraped prediction intervals for any reconciliation strategy. This class is meant to be used as the sampler input as other HierarchicalForecast reconciliation classes. Given a boostraped set of simulated sample paths: y^tau[1],…,y^tau[B])\hat{\mathbf{y}}^{[1]}_{\\tau}, \dots ,\hat{\mathbf{y}}^{[B]}_{\\tau}) The reconciled sample paths allow for reconciled distributional forecasts: (SPy^tau[1],…,SPy^tau[B])(\mathbf{S}\mathbf{P}\hat{\mathbf{y}}^{[1]}_{\\tau}, \dots ,\mathbf{S}\mathbf{P}\hat{\mathbf{y}}^{[B]}_{\\tau}) Parameters:

Bootstrap.get_samples

Bootstrap Sample Reconciliation Method. Applies Bootstrap sample reconciliation method as defined by Gamakumara 2020. Generating independent sample paths and reconciling them with Bootstrap. Parameters: Returns:

3. PERMBU

PERMBU

PERMBU Probabilistic Reconciliation Class. The PERMBU method leverages empirical bottom-level marginal distributions with empirical copula functions (describing bottom-level dependencies) to generate the distribution of aggregate-level distributions using BottomUp reconciliation. The sample reordering technique in the PERMBU method reinjects multivariate dependencies into independent bottom-level samples. residuals=Ο΅^i,tresiduals = \hat{\epsilon}_{i,t} Algorithm:
  1. For all series compute conditional marginals distributions.
  2. Compute residuals and obtain rank permutations.
  3. Obtain K-sample from the bottom-level series predictions.
  4. Apply recursively through the hierarchical structure:
    1. For a given aggregate series ii and its children series:
    2. Obtain children’s empirical joint using sample reordering copula.
    3. From the children’s joint obtain the aggregate series’s samples.
Parameters:

PERMBU.get_samples

PERMBU Sample Reconciliation Method. Applies PERMBU reconciliation method as defined by Taieb et. al 2017. Generating independent base prediction samples, restoring its multivariate dependence using estimated copula with reordering and applying the BottomUp aggregation to the new samples. Parameters: Returns:

References