core.HierarchicalForecast
capabilities class. Check their usage example
here.
*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:
The reconciled forecasts are also normally distributed:
Parameters:S
: np.array, summing matrix of size (base
,
bottom
).P
: np.array, reconciliation matrix of size (bottom
,
base
).y_hat
: Point forecasts values of size (base
,
horizon
).W
: np.array, hierarchical covariance matrix of size
(base
, base
).sigmah
: np.array, forecast standard dev. of size
(base
, horizon
).num_samples
: int, number of bootstraped
samples generated.seed
: int, random seed for numpy generator’s
replicability.*Normality Coherent Samples. Obtains coherent samples under the Normality assumptions. Parameters:
num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (base
, horizon
,
num_samples
).*
*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:
The reconciled sample paths allow for reconciled distributional
forecasts:
Parameters:S
: np.array, summing matrix of size (base
,
bottom
).P
: np.array, reconciliation matrix of size (bottom
,
base
).y_hat
: Point forecasts values of size (base
,
horizon
).y_insample
: Insample values of size (base
,
insample_size
).y_hat_insample
: Insample point forecasts of size
(base
, insample_size
).num_samples
: int, number of bootstraped
samples generated.seed
: int, random seed for numpy generator’s
replicability.*Bootstrap Sample Reconciliation Method. Applies Bootstrap sample reconciliation method as defined by Gamakumara 2020. Generating independent sample paths and reconciling them with Bootstrap. Parameters:
num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (base
, horizon
,
num_samples
).*
*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.
S
: np.array, summing matrix of size (base
,
bottom
).tags
: Each key is a level and each value its S
indices.y_insample
: Insample values of size (base
,
insample_size
).y_hat_insample
: Insample point forecasts of size
(base
, insample_size
).sigmah
: np.array, forecast standard
dev. of size (base
, horizon
).num_samples
: int, number of
normal prediction samples generated.seed
: int, random seed for
numpy generator’s replicability.*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:
num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (base
, horizon
,
num_samples
).*