Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/Make reconcilliation order independent #1592

Conversation

DavidKleindienst
Copy link
Contributor

Fixes #1582.

Summary

Fixes get_projection_matrix in BottomUpReconciliator and TopDownReconcilliator such that the result takes the order of components of the TimeSeries into account.
Adds a test to assert the results of BottomUpReconciliator, TopDownReconciliator and MinTReconciliator do not depend on component order

Other Information

Copy link
Contributor

@hrzn hrzn left a comment

Choose a reason for hiding this comment

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

LGTM to me... can't believe I missed this in the initial implementation 🤦
Many thanks @DavidKleindienst !
@dennisbader we will want this in the next release.

@@ -179,3 +180,43 @@ def test_more_intricate_hierarchy(self):
recon = MinTReconciliator("wls_val")
recon.fit(self.series_complex)
self._assert_reconciliation_complex(recon)

def test_reconcilliation_is_order_independent(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Many thanks for adding the tests too 👍

@codecov-commenter
Copy link

codecov-commenter commented Feb 23, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (32ea9a1) 94.02% compared to head (a02f11b) 94.04%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1592      +/-   ##
==========================================
+ Coverage   94.02%   94.04%   +0.01%     
==========================================
  Files         125      125              
  Lines       11088    11171      +83     
==========================================
+ Hits        10426    10506      +80     
- Misses        662      665       +3     
Impacted Files Coverage Δ
...arts/dataprocessing/transformers/reconciliation.py 99.08% <100.00%> (+0.08%) ⬆️
darts/utils/data/tabularization.py 99.27% <0.00%> (-0.73%) ⬇️
darts/metrics/metrics.py 100.00% <0.00%> (ø)
darts/models/forecasting/baselines.py 100.00% <0.00%> (ø)
darts/dataprocessing/transformers/diff.py 100.00% <0.00%> (ø)
darts/models/filtering/filtering_model.py 100.00% <0.00%> (ø)
darts/timeseries.py 92.28% <0.00%> (+<0.01%) ⬆️
darts/models/forecasting/nhits.py 99.27% <0.00%> (+<0.01%) ⬆️
darts/dataprocessing/encoders/encoder_base.py 96.01% <0.00%> (+0.01%) ⬆️
... and 14 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@madtoinou madtoinou merged commit d2ba591 into unit8co:master Feb 28, 2023
@DavidKleindienst DavidKleindienst deleted the Fix/Make_reconcilliation_order_independent branch March 15, 2023 09:29
alexcolpitts96 pushed a commit to alexcolpitts96/darts that referenced this pull request May 31, 2023
* unit test for component order independence

* remove incorrect assumption from test

* Fix get_projection_matrix

* minor improvement

---------

Co-authored-by: David Kleindienst <kleindienst@ximes.com>
Co-authored-by: madtoinou <32447896+madtoinou@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] TopDownReconciliator changes top level TimeSeries
4 participants