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/bug in ensemble models to support underlying stochastic models #1423

Conversation

eliane-maalouf
Copy link
Contributor

@eliane-maalouf eliane-maalouf commented Dec 10, 2022

Fixes #1390 .

Summary

  • added _is_probabilistic() to some of the baseline models that do not have it
  • added _is_probabilistic() to ensemble classes
  • added a basic unitest for the case

- added _is_probabilistic to ensemble classes
@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2022

Codecov Report

Base: 93.67% // Head: 93.67% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (0adeab2) compared to base (cdf2b44).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1423      +/-   ##
==========================================
- Coverage   93.67%   93.67%   -0.01%     
==========================================
  Files          94       94              
  Lines        9398     9387      -11     
==========================================
- Hits         8804     8793      -11     
  Misses        594      594              
Impacted Files Coverage Δ
darts/models/forecasting/ensemble_model.py 92.00% <100.00%> (+0.33%) ⬆️
darts/timeseries.py 91.71% <0.00%> (-0.06%) ⬇️
...arts/models/forecasting/torch_forecasting_model.py 89.50% <0.00%> (-0.05%) ⬇️
darts/models/forecasting/block_rnn_model.py 98.24% <0.00%> (-0.04%) ⬇️
darts/models/forecasting/nhits.py 99.27% <0.00%> (-0.01%) ⬇️
darts/datasets/__init__.py 100.00% <0.00%> (ø)

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.

Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

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

Thanks @eliane-maalouf , looks good to me :)
Only added some minor suggestions.

darts/models/forecasting/baselines.py Outdated Show resolved Hide resolved
darts/models/forecasting/baselines.py Outdated Show resolved Hide resolved
darts/models/forecasting/theta.py Outdated Show resolved Hide resolved
@eliane-maalouf
Copy link
Contributor Author

thanks @dennisbader for your review. It should be ok now :)

@@ -182,6 +182,9 @@ def min_train_series_length(self) -> int:
else:
return 3

def _is_probabilistic(self) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

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

this one can be removed as well :) after that all looks good!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

;) missed this one, thanks

Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@eliane-maalouf eliane-maalouf merged commit 4e25889 into master Dec 11, 2022
@madtoinou madtoinou deleted the fix/1390-naiveensemblemodel-nor-regressionensemblemodel-support-num_samples-largerthan1 branch April 4, 2023 13:49
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] Neither NaiveEnsembleModel nor RegressionEnsembleModel seem to support num_samples > 1
3 participants