Large collections of time series organized into structures at different aggregation levels often require their forecasts to follow their aggregation constraints, which poses the challenge of creating novel algorithms capable of coherent forecasts.
HierarchicalForecast offers a collection of cross-sectional and
temporal reconciliation methods, including
BottomUp
,
TopDown
,
MiddleOut
,
MinTrace
and
ERM
,
as well as probabilistic coherent predictions including
Normality
,
Bootstrap
,
and
PERMBU
.
BottomUp
: Simple addition to the upper levels.TopDown
: Distributes the top levels forecasts trough the
hierarchies.MiddleOut
: 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.MinTrace
: Minimizes the total forecast variance of the space
of coherent forecasts, with the Minimum Trace reconciliation.ERM
: Optimizes the reconciliation matrix minimizing an L1
regularized objective.Normality
: Uses MinTrace variance-covariance closed form
matrix under a normality assumption.Bootstrap
: Generates distribution of hierarchically reconciled
predictions using Gamakumaraβs bootstrap approach.PERMBU
: Reconciles independent sample predictions by
reinjecting multivariate dependence with estimated rank
permutation copulas, and performing a Bottom-Up aggregation.Missing something? Please open an issue here or write us in
Short: We want to contribute to the ML field by providing reliable baselines and benchmarks for hierarchical forecasting task in industry and academia. Hereβs the complete paper.
Verbose: HierarchicalForecast
integrates publicly available
processed datasets, evaluation metrics, and a curated set of statistical
baselines. In this library we provide usage examples and references to
extensive experiments where we showcase the baselineβs use and evaluate
the accuracy of their predictions. With this work, we hope to contribute
to Machine Learning forecasting by bridging the gap to statistical and
econometric modeling, as well as providing tools for the development of
novel hierarchical forecasting algorithms rooted in a thorough
comparison of these well-established models. We intend to continue
maintaining and increasing the repository, promoting collaboration
across the forecasting community.
You can install the released version of HierarchicalForecast
from
the Python package index with:
(Installing inside a python virtualenvironment or a conda environment is recommended.)
Also you can install the released version of HierarchicalForecast
from conda with:
(Installing inside a python virtualenvironment or a conda environment is recommended.)
If you want to make some modifications to the code and see the effects in real time (without reinstalling), follow the steps below:
The following example needs statsforecast
and datasetsforecast
as
additional packages. If not installed, install it via your preferred
method, e.g.Β pip install statsforecast datasetsforecast
. The
datasetsforecast
library allows us to download hierarhical datasets
and we will use statsforecast
to compute base forecasts to be
reconciled.
You can open this example in Colab
Hereβs the complete paper.
Large collections of time series organized into structures at different aggregation levels often require their forecasts to follow their aggregation constraints, which poses the challenge of creating novel algorithms capable of coherent forecasts.
HierarchicalForecast offers a collection of cross-sectional and
temporal reconciliation methods, including
BottomUp
,
TopDown
,
MiddleOut
,
MinTrace
and
ERM
,
as well as probabilistic coherent predictions including
Normality
,
Bootstrap
,
and
PERMBU
.
BottomUp
: Simple addition to the upper levels.TopDown
: Distributes the top levels forecasts trough the
hierarchies.MiddleOut
: 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.MinTrace
: Minimizes the total forecast variance of the space
of coherent forecasts, with the Minimum Trace reconciliation.ERM
: Optimizes the reconciliation matrix minimizing an L1
regularized objective.Normality
: Uses MinTrace variance-covariance closed form
matrix under a normality assumption.Bootstrap
: Generates distribution of hierarchically reconciled
predictions using Gamakumaraβs bootstrap approach.PERMBU
: Reconciles independent sample predictions by
reinjecting multivariate dependence with estimated rank
permutation copulas, and performing a Bottom-Up aggregation.Missing something? Please open an issue here or write us in
Short: We want to contribute to the ML field by providing reliable baselines and benchmarks for hierarchical forecasting task in industry and academia. Hereβs the complete paper.
Verbose: HierarchicalForecast
integrates publicly available
processed datasets, evaluation metrics, and a curated set of statistical
baselines. In this library we provide usage examples and references to
extensive experiments where we showcase the baselineβs use and evaluate
the accuracy of their predictions. With this work, we hope to contribute
to Machine Learning forecasting by bridging the gap to statistical and
econometric modeling, as well as providing tools for the development of
novel hierarchical forecasting algorithms rooted in a thorough
comparison of these well-established models. We intend to continue
maintaining and increasing the repository, promoting collaboration
across the forecasting community.
You can install the released version of HierarchicalForecast
from
the Python package index with:
(Installing inside a python virtualenvironment or a conda environment is recommended.)
Also you can install the released version of HierarchicalForecast
from conda with:
(Installing inside a python virtualenvironment or a conda environment is recommended.)
If you want to make some modifications to the code and see the effects in real time (without reinstalling), follow the steps below:
The following example needs statsforecast
and datasetsforecast
as
additional packages. If not installed, install it via your preferred
method, e.g.Β pip install statsforecast datasetsforecast
. The
datasetsforecast
library allows us to download hierarhical datasets
and we will use statsforecast
to compute base forecasts to be
reconciled.
You can open this example in Colab
Hereβs the complete paper.