-
Notifications
You must be signed in to change notification settings - Fork 904
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
Feat/local and global models in EnsembleModel #1745
Conversation
…al and Global models
…single ts training/inference only. If provided, the covariates are passed only to the models supporting them (individually)
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #1745 +/- ##
==========================================
- Coverage 94.23% 94.11% -0.12%
==========================================
Files 125 125
Lines 11581 11593 +12
==========================================
- Hits 10913 10911 -2
- Misses 668 682 +14
☔ View full report in Codecov by Sentry. |
…the same covariates, to make the behavior more transparent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also a very nice addition, thanks :) 🚀
Just had some minor comments.
Regarding the pre-trained models, I'm with you on this one and think we shouldn't go with this for now.
Co-authored-by: Dennis Bader <dennis.bader@gmx.ch>
… added tests for covariates support in ensemble models
…nit8co/darts into feat/local-and-global-ensemble
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, we're almost there 🚀
Mainly minor suggestions, and a bug I found using regression models with different covariates support.
Co-authored-by: Dennis Bader <dennis.bader@gmx.ch>
…model, support_*_covariates for RegressionModels rely on the lags attribute
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks great now! 💯 Thanks a lot @madtoinou 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks great now! 💯 Thanks a lot @madtoinou 🚀
* feat: remove restriction in EnsembleModel, models can be a mix of Local and Global models * feat: EnsembleModel accepts a mixture of local and global models for single ts training/inference only. If provided, the covariates are passed only to the models supporting them (individually) * feat: updated unittests * doc: fix typo in docstring, SeasonalityMode must be imported from darts.utils.utils * doc: updated changelog * feat: logger info when all the models in the ensemble do not support the same covariates, to make the behavior more transparent * fix: typo, using parenthesis to call proterty method * Apply suggestions from code review Co-authored-by: Dennis Bader <dennis.bader@gmx.ch> * fix: made the covariates handling in ensemble model more transparent, added tests for covariates support in ensemble models * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Apply suggestions from code review Co-authored-by: Dennis Bader <dennis.bader@gmx.ch> * fix: addressed reviewer comments, added show_warning arg to ensemble_model, support_*_covariates for RegressionModels rely on the lags attribute * fix typo * fix: improve warning synthax --------- Co-authored-by: Dennis Bader <dennis.bader@gmx.ch>
Fixes #1492, fixes #737, fixes #1038.
Summary
EnsembleModel.models
now accept a mix ofLocal
andGlobalForecastingModel
. If the ensemble contains at least one local model, it only supports singleTimeSeries
training/inference.If past/future covariates are provided, they will be passed only the models supporting them (not enforcing same covariates for all the models). I don't know if this is desirable or if all the models should support the exact same covariates in order to belong to the same
EnsembleModel
?Other Information
I wonder if we should also allow pre-trained
GlobalForecastingModel
inEnsembleModel
with a flag to bypass the exception currently raised (and make sure the user is aware of the implications). This could be quite powerful but would open the door for data leakage that could be difficult to detect:RegressionEnsembleModel
) : undetectable