Skip to content

Conversation

brsnw250
Copy link
Collaborator

Before submitting (must do checklist)

  • Did you read the contribution guide?
  • Did you update the docs? We use Numpy format for all the methods and classes.
  • Did you write any new necessary tests?
  • Did you update the CHANGELOG?

Proposed Changes

  • Added support for generation of summing matrix for the same level

Closing issues

closes #1038

@brsnw250 brsnw250 self-assigned this Dec 28, 2022
@github-actions
Copy link

github-actions bot commented Dec 28, 2022

@github-actions github-actions bot temporarily deployed to pull request December 28, 2022 09:39 Inactive
@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2022

Codecov Report

❗ No coverage uploaded for pull request base (hierarchical_pipeline@363b013). Click here to learn what that means.
The diff coverage is n/a.

@@                   Coverage Diff                    @@
##             hierarchical_pipeline    #1055   +/-   ##
========================================================
  Coverage                         ?   86.48%           
========================================================
  Files                            ?      167           
  Lines                            ?     8899           
  Branches                         ?        0           
========================================================
  Hits                             ?     7696           
  Misses                           ?     1203           
  Partials                         ?        0           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@brsnw250 brsnw250 marked this pull request as ready for review December 28, 2022 13:02
@github-actions github-actions bot temporarily deployed to pull request December 28, 2022 13:05 Inactive
@github-actions github-actions bot temporarily deployed to pull request December 28, 2022 13:41 Inactive
@github-actions github-actions bot temporarily deployed to pull request December 28, 2022 13:49 Inactive
@brsnw250 brsnw250 changed the title Create TopDownReconciler Create TopDownReconciliator Dec 29, 2022
@github-actions github-actions bot temporarily deployed to pull request December 29, 2022 11:44 Inactive

proportions_method = ReconciliationProportionsMethod(method)
if proportions_method == ReconciliationProportionsMethod.AHP:
self._proportions_method_func = self._estimate_ahp_proportion
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initialize firstly to turn on type checking

self._proportions_method_func: Optional[<type>] = None

Copy link
Collaborator Author

@brsnw250 brsnw250 Dec 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this? This attribute can't be uninitialized. Init raises error if it fails to assign method reference to this variable.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be uninitialized if we add new ReconciliationProportionsMethod but forget to add new case in "if-else", but I guess type checking won't catch it. So the better way would be to add "else" case throwing error there

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

elif proportions_method == ReconciliationProportionsMethod.PHA:
self._proportions_method_func = self._estimate_pha_proportion

def fit(self, ts: TSDataset) -> "TopDownReconciliator":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also check that values in target are non-negative, otherwise method might work incorrectly

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added check and test

@github-actions github-actions bot temporarily deployed to pull request December 30, 2022 08:30 Inactive
@alex-hse-repository alex-hse-repository merged commit 6985a21 into hierarchical_pipeline Dec 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants