Zurück zu den Modellen
Transformer

Reconciler

Hierarchical reconciliation transformer.

Hierarchical reconciliation is a transformation which is used to make the predictions in a hierarchy of time-series sum together appropriately.

The methods implemented in this class only require the structure of the hierarchy or the forecasts values for reconciliation.

These functions are intended for transforming hierarchical forecasts, i.e. after prediction. However they are general and can be used to transform hierarchical time-series data.

For reconciliation methods that require historical values in addition to the forecasts, such as MinT, see the ReconcilerForecaster class.

For more versatile and efficient reconciliation in pipelines, see BottomUpReconciler, TopdownReconciler, OptimalReconciler, NonNegativeOptimalReconciler, MiddleOutReconciler, that apply reconciliation as preprocessing and postprocessing steps.

For further information on the methods, see [1].

Schnellstart

python
from sktime.transformations.hierarchical.reconcile import Reconciler

estimator = Reconciler(method='bu')

Tags

Fähigkeiten

  • Reihen ungleicher Länge
  • Multivariat: Nicht unterstützt
  • Inverse Transformation: Nicht unterstützt
  • Fehlende Werte: Nicht unterstützt
  • Entfernt fehlende Werte: Nicht unterstützt
  • Gleicht Reihenlängen an: Nicht unterstützt

Eigenschaften

Eingabetypscitype:transform-input
Series
Ausgabetypscitype:transform-output
Series
Label-Typscitype:transform-labels
None
Fit ist leerfit_is_empty
Nein
Behält den Zeitindextransform-returns-same-time-index
Ja
Benötigt Xrequires_X
Ja
Benötigt yrequires_y
Nein
X und y brauchen denselben IndexX-y-must-have-same-index
Nein

Parameter(1)

method{“bu”, “ols”, “wls_str”, “td_fcst”}, default=”bu”

The reconciliation approach applied to the forecasts

  • "bu" - bottom-up

  • "ols" - ordinary least squares

  • "wls_str" - weighted least squares (structural)

  • "td_fcst" - top down based on (forecast) proportions

Beispiele

>>> from sktime.forecasting.trend import PolynomialTrendForecaster
>>> from sktime.transformations.hierarchical.reconcile import Reconciler
>>> from sktime.transformations.hierarchical.aggregate import Aggregator
>>> from sktime.utils._testing.hierarchical import _bottom_hier_datagen
>>> agg = Aggregator ()
>>> y = _bottom_hier_datagen (
... no_bottom_nodes = 3,
... no_levels = 1,
... random_seed = 123,
... )
>>> y = agg. fit_transform (y)
>>> forecaster = PolynomialTrendForecaster ()
>>> forecaster. fit (y) PolynomialTrendForecaster(
... )
>>> prds = forecaster. predict (fh = [1 ])
>>> # reconcile forecasts
>>> reconciler = Reconciler (method = "ols")
>>> prds_recon = reconciler. fit_transform (prds)

Referenzen