TopDownReconciliator¶
- class TopDownReconciliator(target_level: str, source_level: str, period: int, method: str)[source]¶
Bases:
etna.reconciliation.base.BaseReconciliatorTop-down reconciliation methods.
Notes
Top-down reconciliation methods support only non-negative data.
Create top-down reconciliator from
source_leveltotarget_level.- Parameters
target_level (str) – Level to be reconciled from the forecasts.
source_level (str) – Level to be forecasted.
period (int) – Period length for calculation reconciliation proportions.
method (str) –
Proportions calculation method. Selects last
periodtimestamps for estimation. Currently supported options:AHP - Average historical proportions
PHA - Proportions of the historical averages
- 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.
to_dict()Collect all information about etna object in dict.
- fit(ts: etna.datasets.tsdataset.TSDataset) etna.reconciliation.top_down.TopDownReconciliator[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