Skip to content

Create HierarchicalPipeline #1029

Closed
alex-hse-repository opened this issue Dec 6, 2022 · 0 comments
Closed

Create HierarchicalPipeline #1029

alex-hse-repository opened this issue Dec 6, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@alex-hse-repository
Copy link
Collaborator

alex-hse-repository commented Dec 6, 2022

🚀 Feature Request

Create pipeline to process hierarchical time series

Proposal

Create class:

class HierarchicalPipeline(Pipeline):
    def __init__(
                self,
                reconciler: BaseReconciler,
                model: ModelType,
                transforms: Sequence[Transform] = (),
                horizon: int = 1
    ):
  1. Implement method fit:
  • Fit the reconciler using reconciler.fit method
  • Aggregate dataset on the source_level using reconciler.aggregate
  • Call the fit method of super class with generated dataset
  1. Implement method raw_forecast()
  • Call the forecast method of the super class
  1. Implement method forecast()
  • Call the raw_forecast
  • Generate the target dataset using reconciler.reconcile

Test cases

  1. Test that after fit pipeline saves correct ts on the source_level of reconciler
  2. Test that raw_forecast generates forecast on the source_level of reconciler
  3. Test that forecast generates forecast on the target_level of reconciler
  4. Test that backtest works and produce correct metrics(you can use constant dataset for example)

All the tests should cover both top-down and bottom-up reconcilers with correct source and target levels

Additional context

blocked by #1037 #1038 #1044

@alex-hse-repository alex-hse-repository added the enhancement New feature or request label Dec 6, 2022
@brsnw250 brsnw250 self-assigned this Jan 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants