Transformer
TopdownReconciler
Inverse transformUnequal-length series
Apply Topdown hierarchical reconciliation.
Forecast proportions keep the original series during transform, and propagate the “proportions” of each forecast with respect to its total during inverse_transform.
Topdown share, on the other hand, transforms the series to share the forecast with respect to their parent, and then uses the total forecast to multiply the shares.
For more information, see “Single level approaches” in [1].
Quickstart
python
from sktime.transformations.hierarchical.reconcile import TopdownReconciler
estimator = TopdownReconciler(method='td_fcst')Tags
Capabilities
- Inverse transform: Supported
- Unequal-length series
- Multivariate: Not supported
- Missing values: Not supported
- Removes missing values: Not supported
- Equalizes series length: Not supported
Properties
- Input typescitype:transform-input
- Series
- Output typescitype:transform-output
- Series
- Label typescitype:transform-labels
- None
- Fit is emptyfit_is_empty
- No
- Keeps the time indextransform-returns-same-time-index
- No
- Requires Xrequires_X
- Yes
- Requires yrequires_y
- No
- X and y need the same indexX-y-must-have-same-index
- No
Parameters(1)
- methodstr, default=”td_fcst”
- The method to use for reconciliation. - td_fcst: Forecast Proportions. - td_share: Topdown Share.
Examples
>>> from sktime.transformations.hierarchical.reconcile import (
... TopdownReconciler)
>>> from sktime.utils._testing.hierarchical import _make_hierarchical
>>> from sktime.forecasting.naive import NaiveForecaster
>>> y = _make_hierarchical ()
>>> pipe = TopdownReconciler () * NaiveForecaster ()
>>> pipe = pipe. fit (y)
>>> y_pred = pipe. predict (fh = [1, 2, 3 ])References
[1]
Hyndman, R. J., & Athanasopoulos, G. (2018). Forecasting: principles and practice. OTexts.