BaseReconciliator

class BaseReconciliator(target_level: str, source_level: str)[source]

Bases: abc.ABC, etna.core.mixins.BaseMixin

Base class to hold reconciliation methods.

Init BaseReconciliator.

Parameters
  • target_level (str) – Level to be reconciled from the forecasts.

  • source_level (str) – Level to be forecasted.

Inherited-members

Methods

aggregate(ts)

Aggregate the dataset to the source_level.

fit(ts)

Fit the reconciliator parameters.

reconcile(ts)

Reconcile the forecasts in the dataset.

set_params(**params)

Return new object instance with modified parameters.

to_dict()

Collect all information about etna object in dict.

aggregate(ts: etna.datasets.tsdataset.TSDataset) etna.datasets.tsdataset.TSDataset[source]

Aggregate the dataset to the source_level.

Parameters

ts (etna.datasets.tsdataset.TSDataset) – TSDataset on the level which is lower or equal to source_level.

Returns

TSDataset on the source_level.

Return type

etna.datasets.tsdataset.TSDataset

abstract fit(ts: etna.datasets.tsdataset.TSDataset) etna.reconciliation.base.BaseReconciliator[source]

Fit the reconciliator parameters.

Parameters

ts (etna.datasets.tsdataset.TSDataset) – TSDataset on the level which is lower or equal to target_level, source_level.

Returns

Fitted instance of reconciliator.

Return type

etna.reconciliation.base.BaseReconciliator

reconcile(ts: etna.datasets.tsdataset.TSDataset) etna.datasets.tsdataset.TSDataset[source]

Reconcile the forecasts in the dataset.

Parameters

ts (etna.datasets.tsdataset.TSDataset) – TSDataset on the source_level.

Returns

TSDataset on the target_level.

Return type

etna.datasets.tsdataset.TSDataset