HierarchicalForecast
package provides the most comprehensive
collection of Python implementations of hierarchical forecasting
algorithms that follow classic hierarchical reconciliation. All the
methods have a reconcile
function capable of reconciling base
forecasts using numpy
arrays.
*Bottom Up Reconciliation Class. The most basic hierarchical reconciliation is performed using an Bottom-Up strategy. It was proposed for the first time by Orcutt in 1968. The corresponding hierarchical “projection” matrix is defined as: Parameters:
*Bottom Up Fit Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).idx_bottom
:
Indices corresponding to the bottom level of S
, size (bottom
).y_insample
: In-sample values of size (base
, horizon
).y_hat_insample
: In-sample forecast values of size (base
,
horizon
).sigmah
: Estimated standard deviation of the
conditional marginal distribution.intervals_method
: Sampler for prediction intervals, one of
normality
, bootstrap
, permbu
.num_samples
: Number of samples
for probabilistic coherent distribution.seed
: Seed for
reproducibility.**sampler_kwargs
: Coherent sampler instantiation
arguments.self
: object, fitted reconciler.*
*Predict using reconciler. Predict using fitted mean and probabilistic reconcilers. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).level
: float
list 0-100, confidence levels for prediction intervals.y_tilde
: Reconciliated predictions.*
*BottomUp Reconciliation Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).idx_bottom
:
Indices corresponding to the bottom level of S
, size (bottom
).y_insample
: In-sample values of size (base
, insample_size
).y_hat_insample
: In-sample forecast values of size (base
,
insample_size
).sigmah
: Estimated standard deviation of the
conditional marginal distribution.level
: float list 0-100, confidence levels for prediction
intervals.intervals_method
: Sampler for prediction intervals, one
of normality
, bootstrap
, permbu
.num_samples
: Number of
samples for probabilistic coherent distribution.seed
: Seed for
reproducibility.**sampler_kwargs
: Coherent sampler instantiation
arguments.y_tilde
: Reconciliated y_hat using the Bottom Up
approach.*
*Sample probabilistic coherent distribution. Generates n samples from a probabilistic coherent distribution. The method uses fitted mean and probabilistic reconcilers, defined by the
intervals_method
selected during the reconciler’s instantiation.
Currently available: normality
, bootstrap
, permbu
.
Parameters:num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (num_series
,
horizon
, num_samples
).*
*BottomUpSparse Reconciliation Class. This is the implementation of a Bottom Up reconciliation using the sparse matrix approach. It works much more efficient on datasets with many time series. [makoren: At least I hope so, I only checked up until ~20k time series, and there’s no real improvement, it would be great to check for smth like 1M time series, where the dense S matrix really stops fitting in memory] See the parent class for more details.*
*Bottom Up Fit Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).idx_bottom
:
Indices corresponding to the bottom level of S
, size (bottom
).y_insample
: In-sample values of size (base
, horizon
).y_hat_insample
: In-sample forecast values of size (base
,
horizon
).sigmah
: Estimated standard deviation of the
conditional marginal distribution.intervals_method
: Sampler for prediction intervals, one of
normality
, bootstrap
, permbu
.num_samples
: Number of samples
for probabilistic coherent distribution.seed
: Seed for
reproducibility.**sampler_kwargs
: Coherent sampler instantiation
arguments.self
: object, fitted reconciler.*
*Predict using reconciler. Predict using fitted mean and probabilistic reconcilers. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).level
: float
list 0-100, confidence levels for prediction intervals.y_tilde
: Reconciliated predictions.*
*BottomUp Reconciliation Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).idx_bottom
:
Indices corresponding to the bottom level of S
, size (bottom
).y_insample
: In-sample values of size (base
, insample_size
).y_hat_insample
: In-sample forecast values of size (base
,
insample_size
).sigmah
: Estimated standard deviation of the
conditional marginal distribution.level
: float list 0-100, confidence levels for prediction
intervals.intervals_method
: Sampler for prediction intervals, one
of normality
, bootstrap
, permbu
.num_samples
: Number of
samples for probabilistic coherent distribution.seed
: Seed for
reproducibility.**sampler_kwargs
: Coherent sampler instantiation
arguments.y_tilde
: Reconciliated y_hat using the Bottom Up
approach.*
*Sample probabilistic coherent distribution. Generates n samples from a probabilistic coherent distribution. The method uses fitted mean and probabilistic reconcilers, defined by the
intervals_method
selected during the reconciler’s instantiation.
Currently available: normality
, bootstrap
, permbu
.
Parameters:num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (num_series
,
horizon
, num_samples
).*
*Top Down Reconciliation Class. The Top Down hierarchical reconciliation method, distributes the total aggregate predictions and decomposes it down the hierarchy using proportions that can be actual historical values or estimated. Parameters:
method
: One of forecast_proportions
,
average_proportions
and proportion_averages
.*TopDown Fit Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).y_insample
:
Insample values of size (base
, insample_size
). Optional for
forecast_proportions
method.y_hat_insample
: Insample forecast
values of size (base
, insample_size
). Optional for
forecast_proportions
method.sigmah
: Estimated standard
deviation of the conditional marginal distribution.interval_method
: Sampler for prediction intervals, one of normality
,
bootstrap
, permbu
.num_samples
: Number of samples for
probabilistic coherent distribution.seed
: Seed for
reproducibility.tags
: Each key is a level and each value its S
indices.idx_bottom
: Indices corresponding to the bottom level of
S
, size (bottom
).self
: object, fitted reconciler.*
*Predict using reconciler. Predict using fitted mean and probabilistic reconcilers. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).level
: float
list 0-100, confidence levels for prediction intervals.y_tilde
: Reconciliated predictions.*
*Top Down Reconciliation Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).tags
: Each
key is a level and each value its S
indices.idx_bottom
: Indices
corresponding to the bottom level of S
, size (bottom
).y_insample
: Insample values of size (base
, insample_size
).
Optional for forecast_proportions
method.y_hat_insample
:
Insample forecast values of size (base
, insample_size
). Optional for
forecast_proportions
method.sigmah
: Estimated standard
deviation of the conditional marginal distribution.level
: float
list 0-100, confidence levels for prediction intervals.intervals_method
: Sampler for prediction intervals, one of
normality
, bootstrap
, permbu
.num_samples
: Number of samples
for probabilistic coherent distribution.seed
: Seed for
reproducibility.y_tilde
: Reconciliated y_hat using the Top Down
approach.*
*Sample probabilistic coherent distribution. Generates n samples from a probabilistic coherent distribution. The method uses fitted mean and probabilistic reconcilers, defined by the
intervals_method
selected during the reconciler’s instantiation.
Currently available: normality
, bootstrap
, permbu
.
Parameters:num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (num_series
,
horizon
, num_samples
).*
*TopDownSparse Reconciliation Class. This is an implementation of top-down reconciliation using the sparse matrix approach. It works much more efficiently on data sets with many time series. See the parent class for more details.*
*TopDown Fit Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).y_insample
:
Insample values of size (base
, insample_size
). Optional for
forecast_proportions
method.y_hat_insample
: Insample forecast
values of size (base
, insample_size
). Optional for
forecast_proportions
method.sigmah
: Estimated standard
deviation of the conditional marginal distribution.interval_method
: Sampler for prediction intervals, one of normality
,
bootstrap
, permbu
.num_samples
: Number of samples for
probabilistic coherent distribution.seed
: Seed for
reproducibility.tags
: Each key is a level and each value its S
indices.idx_bottom
: Indices corresponding to the bottom level of
S
, size (bottom
).self
: object, fitted reconciler.*
*Predict using reconciler. Predict using fitted mean and probabilistic reconcilers. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).level
: float
list 0-100, confidence levels for prediction intervals.y_tilde
: Reconciliated predictions.*
*Top Down Reconciliation Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).tags
: Each
key is a level and each value its S
indices.idx_bottom
: Indices
corresponding to the bottom level of S
, size (bottom
).y_insample
: Insample values of size (base
, insample_size
).
Optional for forecast_proportions
method.y_hat_insample
:
Insample forecast values of size (base
, insample_size
). Optional for
forecast_proportions
method.sigmah
: Estimated standard
deviation of the conditional marginal distribution.level
: float
list 0-100, confidence levels for prediction intervals.intervals_method
: Sampler for prediction intervals, one of
normality
, bootstrap
, permbu
.num_samples
: Number of samples
for probabilistic coherent distribution.seed
: Seed for
reproducibility.y_tilde
: Reconciliated y_hat using the Top Down
approach.*
*Sample probabilistic coherent distribution. Generates n samples from a probabilistic coherent distribution. The method uses fitted mean and probabilistic reconcilers, defined by the
intervals_method
selected during the reconciler’s instantiation.
Currently available: normality
, bootstrap
, permbu
.
Parameters:num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (num_series
,
horizon
, num_samples
).*
*Middle Out Reconciliation Class. This method is only available for strictly hierarchical structures. It anchors the base predictions in a middle level. The levels above the base predictions use the Bottom-Up approach, while the levels below use a Top-Down. Parameters:
middle_level
: Middle level.top_down_method
:
One of forecast_proportions
, average_proportions
and
proportion_averages
.*Predict using reconciler. Predict using fitted mean and probabilistic reconcilers. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).level
: float
list 0-100, confidence levels for prediction intervals.y_tilde
: Reconciliated predictions.*
*Middle Out Reconciliation Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).tags
: Each
key is a level and each value its S
indices.y_insample
:
Insample values of size (base
, insample_size
). Only used for
forecast_proportions
y_hat_insample
: In-sample forecast values
of size (base
, insample_size
).sigmah
: Estimated standard
deviation of the conditional marginal distribution.level
: float list 0-100, confidence levels for prediction
intervals.intervals_method
: Sampler for prediction intervals, one
of normality
, bootstrap
, permbu
.num_samples
: Number of
samples for probabilistic coherent distribution.seed
: Seed for
reproducibility.y_tilde
: Reconciliated y_hat using the Middle Out
approach.*
*Sample probabilistic coherent distribution. Generates n samples from a probabilistic coherent distribution. The method uses fitted mean and probabilistic reconcilers, defined by the
intervals_method
selected during the reconciler’s instantiation.
Currently available: normality
, bootstrap
, permbu
.
Parameters:num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (num_series
,
horizon
, num_samples
).*
*MiddleOutSparse Reconciliation Class. This is an implementation of middle-out reconciliation using the sparse matrix approach. It works much more efficiently on data sets with many time series. See the parent class for more details.*
*Predict using reconciler. Predict using fitted mean and probabilistic reconcilers. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).level
: float
list 0-100, confidence levels for prediction intervals.y_tilde
: Reconciliated predictions.*
*Middle Out Reconciliation Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).tags
: Each
key is a level and each value its S
indices.y_insample
:
Insample values of size (base
, insample_size
). Only used for
forecast_proportions
y_hat_insample
: In-sample forecast values
of size (base
, insample_size
).sigmah
: Estimated standard
deviation of the conditional marginal distribution.level
: float list 0-100, confidence levels for prediction
intervals.intervals_method
: Sampler for prediction intervals, one
of normality
, bootstrap
, permbu
.num_samples
: Number of
samples for probabilistic coherent distribution.seed
: Seed for
reproducibility.y_tilde
: Reconciliated y_hat using the Middle Out
approach.*
*Sample probabilistic coherent distribution. Generates n samples from a probabilistic coherent distribution. The method uses fitted mean and probabilistic reconcilers, defined by the
intervals_method
selected during the reconciler’s instantiation.
Currently available: normality
, bootstrap
, permbu
.
Parameters:num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (num_series
,
horizon
, num_samples
).*
*MinTrace Reconciliation Class. This reconciliation algorithm proposed by Wickramasuriya et al. depends on a generalized least squares estimator and an estimator of the covariance matrix of the coherency errors . The Min Trace algorithm minimizes the squared errors for the coherent forecasts under an unbiasedness assumption; the solution has a closed form.
method
: str, one of ols
, wls_struct
,
wls_var
, mint_shrink
, mint_cov
.nonnegative
: bool,
reconciled forecasts should be nonnegative?mint_shr_ridge
:
float=2e-8, ridge numeric protection to MinTrace-shr covariance
estimator.num_threads
: int=1, number of threads to use for
solving the optimization problems (when nonnegative=True).
References:*MinTrace Fit Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).y_insample
:
Insample values of size (base
, insample_size
). Only used with
“wls_var”, “mint_cov”, “mint_shrink”.y_hat_insample
: Insample
forecast values of size (base
, insample_size
). Only used with
“wls_var”, “mint_cov”, “mint_shrink”sigmah
: Estimated standard
deviation of the conditional marginal distribution.intervals_method
: Sampler for prediction intervals, one of
normality
, bootstrap
, permbu
.num_samples
: Number of samples
for probabilistic coherent distribution.seed
: Seed for
reproducibility.tags
: Each key is a level and each value its S
indices.idx_bottom
: Indices corresponding to the bottom level of
S
, size (bottom
).self
: object, fitted reconciler.*
*Predict using reconciler. Predict using fitted mean and probabilistic reconcilers. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).level
: float
list 0-100, confidence levels for prediction intervals.y_tilde
: Reconciliated predictions.*
*MinTrace Reconciliation Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).idx_bottom
:
Indices corresponding to the bottom level of S
, size (bottom
).y_insample
: Insample values of size (base
, insample_size
). Only
used by wls_var
, mint_cov
, mint_shrink
y_hat_insample
:
Insample fitted values of size (base
, insample_size
). Only used by
wls_var
, mint_cov
, mint_shrink
sigmah
: Estimated standard
deviation of the conditional marginal distribution.level
: float
list 0-100, confidence levels for prediction intervals.intervals_method
: Sampler for prediction intervals, one of
normality
, bootstrap
, permbu
.num_samples
: Number of samples
for probabilistic coherent distribution.seed
: Seed for
reproducibility.tags
: Each key is a level and each value its S
indices.y_tilde
: Reconciliated y_hat using the MinTrace
approach.*
*Sample probabilistic coherent distribution. Generates n samples from a probabilistic coherent distribution. The method uses fitted mean and probabilistic reconcilers, defined by the
intervals_method
selected during the reconciler’s instantiation.
Currently available: normality
, bootstrap
, permbu
.
Parameters:num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (num_series
,
horizon
, num_samples
).*
*MinTraceSparse Reconciliation Class. This is the implementation of OLS and WLS estimators using sparse matrices. It is not guaranteed to give identical results to the non-sparse version, but works much more efficiently on data sets with many time series.
method
: str, one of ols
, wls_struct
, or
wls_var
.nonnegative
: bool, return non-negative reconciled
forecasts.num_threads
: int, number of threads to execute
non-negative quadratic programming calls.qp
: bool, implement
non-negativity constraint with a quadratic programming approach. Setting
this to True generally gives better results, but at the expense of
higher cost to compute. *MinTraceSparse Fit Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).y_insample
:
Insample values of size (base
, insample_size
). Only used with
“wls_var”.y_hat_insample
: Insample forecast values of size
(base
, insample_size
). Only used with “wls_var”sigmah
:
Estimated standard deviation of the conditional marginal
distribution.intervals_method
: Sampler for prediction intervals,
one of normality
, bootstrap
, permbu
.num_samples
: Number of
samples for probabilistic coherent distribution.seed
: Seed for
reproducibility.tags
: Each key is a level and each value its S
indices.idx_bottom
: Indices corresponding to the bottom level of
S
, size (bottom
).self
: object, fitted reconciler.*
*Predict using reconciler. Predict using fitted mean and probabilistic reconcilers. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).level
: float
list 0-100, confidence levels for prediction intervals.y_tilde
: Reconciliated predictions.*
*MinTrace Reconciliation Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).idx_bottom
:
Indices corresponding to the bottom level of S
, size (bottom
).y_insample
: Insample values of size (base
, insample_size
). Only
used by wls_var
, mint_cov
, mint_shrink
y_hat_insample
:
Insample fitted values of size (base
, insample_size
). Only used by
wls_var
, mint_cov
, mint_shrink
sigmah
: Estimated standard
deviation of the conditional marginal distribution.level
: float
list 0-100, confidence levels for prediction intervals.intervals_method
: Sampler for prediction intervals, one of
normality
, bootstrap
, permbu
.num_samples
: Number of samples
for probabilistic coherent distribution.seed
: Seed for
reproducibility.tags
: Each key is a level and each value its S
indices.y_tilde
: Reconciliated y_hat using the MinTrace
approach.*
*Sample probabilistic coherent distribution. Generates n samples from a probabilistic coherent distribution. The method uses fitted mean and probabilistic reconcilers, defined by the
intervals_method
selected during the reconciler’s instantiation.
Currently available: normality
, bootstrap
, permbu
.
Parameters:num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (num_series
,
horizon
, num_samples
).*
*Optimal Combination Reconciliation Class. This reconciliation algorithm was proposed by Hyndman et al. 2011, the method uses generalized least squares estimator using the coherency errors covariance matrix. Consider the covariance of the base forecast , the matrix of this method is defined by: where denotes the variance pseudo-inverse. The method was later proven equivalent to
MinTrace
variants.
Parameters:method
: str, allowed optimal combination methods:
‘ols’, ‘wls_struct’.nonnegative
: bool, reconciled forecasts
should be nonnegative?*MinTrace Fit Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).y_insample
:
Insample values of size (base
, insample_size
). Only used with
“wls_var”, “mint_cov”, “mint_shrink”.y_hat_insample
: Insample
forecast values of size (base
, insample_size
). Only used with
“wls_var”, “mint_cov”, “mint_shrink”sigmah
: Estimated standard
deviation of the conditional marginal distribution.intervals_method
: Sampler for prediction intervals, one of
normality
, bootstrap
, permbu
.num_samples
: Number of samples
for probabilistic coherent distribution.seed
: Seed for
reproducibility.tags
: Each key is a level and each value its S
indices.idx_bottom
: Indices corresponding to the bottom level of
S
, size (bottom
).self
: object, fitted reconciler.*
*Predict using reconciler. Predict using fitted mean and probabilistic reconcilers. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).level
: float
list 0-100, confidence levels for prediction intervals.y_tilde
: Reconciliated predictions.*
*MinTrace Reconciliation Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).idx_bottom
:
Indices corresponding to the bottom level of S
, size (bottom
).y_insample
: Insample values of size (base
, insample_size
). Only
used by wls_var
, mint_cov
, mint_shrink
y_hat_insample
:
Insample fitted values of size (base
, insample_size
). Only used by
wls_var
, mint_cov
, mint_shrink
sigmah
: Estimated standard
deviation of the conditional marginal distribution.level
: float
list 0-100, confidence levels for prediction intervals.intervals_method
: Sampler for prediction intervals, one of
normality
, bootstrap
, permbu
.num_samples
: Number of samples
for probabilistic coherent distribution.seed
: Seed for
reproducibility.tags
: Each key is a level and each value its S
indices.y_tilde
: Reconciliated y_hat using the MinTrace
approach.*
*Sample probabilistic coherent distribution. Generates n samples from a probabilistic coherent distribution. The method uses fitted mean and probabilistic reconcilers, defined by the
intervals_method
selected during the reconciler’s instantiation.
Currently available: normality
, bootstrap
, permbu
.
Parameters:num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (num_series
,
horizon
, num_samples
).*
*Empirical Risk Minimization Reconciliation Class. The Empirical Risk Minimization reconciliation strategy relaxes the unbiasedness assumptions from previous reconciliation methods like MinT and optimizes square errors between the reconciled predictions and the validation data to obtain an optimal reconciliation matrix P. The exact solution for (
method='closed'
) follows the
expression:
The alternative Lasso regularized solution
(method='reg_bu'
) is useful when the observations of validation data
is limited or the exact solution has low numerical stability.
Parameters:method
: str, one of closed
, reg
and
reg_bu
.lambda_reg
: float, l1 regularizer for reg
and
reg_bu
.*ERM Fit Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).y_insample
:
Train values of size (base
, insample_size
).y_hat_insample
:
Insample train predictions of size (base
, insample_size
).sigmah
: Estimated standard deviation of the conditional marginal
distribution.intervals_method
: Sampler for prediction intervals,
one of normality
, bootstrap
, permbu
.num_samples
: Number of
samples for probabilistic coherent distribution.seed
: Seed for
reproducibility.tags
: Each key is a level and each value its S
indices.idx_bottom
: Indices corresponding to the bottom level of
S
, size (bottom
).self
: object, fitted reconciler.*
*Predict using reconciler. Predict using fitted mean and probabilistic reconcilers. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).level
: float
list 0-100, confidence levels for prediction intervals.y_tilde
: Reconciliated predictions.*
*ERM Reconciliation Method. Parameters:
S
: Summing matrix of size (base
, bottom
).y_hat
: Forecast values of size (base
, horizon
).idx_bottom
:
Indices corresponding to the bottom level of S
, size (bottom
).y_insample
: Train values of size (base
, insample_size
).y_hat_insample
: Insample train predictions of size (base
,
insample_size
).sigmah
: Estimated standard deviation of the
conditional marginal distribution.level
: float list 0-100,
confidence levels for prediction intervals.intervals_method
:
Sampler for prediction intervals, one of normality
, bootstrap
,
permbu
.num_samples
: Number of samples for probabilistic
coherent distribution.seed
: Seed for reproducibility.tags
:
Each key is a level and each value its S
indices.y_tilde
: Reconciliated y_hat using the ERM
approach.*
*Sample probabilistic coherent distribution. Generates n samples from a probabilistic coherent distribution. The method uses fitted mean and probabilistic reconcilers, defined by the
intervals_method
selected during the reconciler’s instantiation.
Currently available: normality
, bootstrap
, permbu
.
Parameters:num_samples
: int, number of samples generated from
coherent distribution.samples
: Coherent samples of size (num_series
,
horizon
, num_samples
).*