Transformer
NonNegativeOptimalReconciler
Inverse transformUnequal-length series
Apply non-negative reconciliation to hierarchical time series.
Uses all the forecasts to obtain a reconciled forecast, avoiding negative values.
The optimization problem tries to find the bottom forecasts $b$ which are non-negative and minimize the distance between the base forecasts and the reconciled forecasts, given the invertion of error covariance matrix $E$ as a weighting matrix.
Quickstart
python
from sktime.transformations.hierarchical.reconcile import NonNegativeOptimalReconciler
estimator = NonNegativeOptimalReconciler(error_covariance_matrix: DataFrame=None, alpha=0)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(2)
- error_covariance_matrixpd.DataFrame, default=None
- Error covariance matrix. If None, it is assumed to be the identity matrix
- alphafloat, default=0
- Constant added to the diagonal of the inverted matrix.
Examples
>>> from sktime.transformations.hierarchical.reconcile import (
... NonNegativeOptimalReconciler)
>>> from sktime.utils._testing.hierarchical import _make_hierarchical
>>> from sktime.forecasting.exp_smoothing import ExponentialSmoothing
>>> y = _make_hierarchical ()
>>> pipe = NonNegativeOptimalReconciler () * ExponentialSmoothing ()
>>> pipe = pipe. fit (y)
>>> y_pred = pipe. predict (fh = [1, 2, 3 ])