-
Notifications
You must be signed in to change notification settings - Fork 872
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/scalar with window #2529
base: master
Are you sure you want to change the base?
Feat/scalar with window #2529
Conversation
…th-window # Conflicts: # darts/models/forecasting/forecasting_model.py # darts/models/forecasting/regression_model.py # darts/utils/historical_forecasts/optimized_historical_forecasts_regression.py # darts/utils/historical_forecasts/utils.py
Co-authored-by: Dennis Bader <dennis.bader@gmx.ch>
…nsform without model retrain
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2529 +/- ##
==========================================
- Coverage 93.86% 93.84% -0.02%
==========================================
Files 139 139
Lines 14855 14906 +51
==========================================
+ Hits 13943 13989 +46
- Misses 912 917 +5 ☔ View full report in Codecov by Sentry. |
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.
Thanks a lot @madtoinou this looks really great 🚀 I like the approach with the Pipeline instead of Transformers :)
Had some remarks and suggestions, we can discuss later.
darts/utils/historical_forecasts/optimized_historical_forecasts_regression.py
Outdated
Show resolved
Hide resolved
darts/utils/historical_forecasts/optimized_historical_forecasts_regression.py
Outdated
Show resolved
Hide resolved
darts/tests/models/forecasting/test_global_forecasting_models.py
Outdated
Show resolved
Hide resolved
[True, False], | ||
), | ||
) | ||
def test_historical_forecasts_with_scaler(self, params): |
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 one 👍 :)
Could you check for 2 historical forecast iterations? Also checking last_points_only=False
, and enable_optimization=True
would be important.
[True, False], | ||
), | ||
) | ||
def test_historical_forecasts_with_scaler(self, params): |
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.
should we move this test into darts/tests/models/forecasting/test_historical_forecasts.py
and generalize for local, torch, and regression models?
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Checklist before merging this PR:
Fixes #1540.
Summary
Scaler/Pipeline
tohistorical_forecasts()
,backtest()
andgridsearch()
to avoid data-leakageenable_optimization=True
, thePipeline
must already be fitted (when applicable), all the series are transformed in one passPipeline
are systematically fitted and applied to the series between each forecast horizon (regardless of theretrain
parameter value)Other Information
The input series to these methods must always be "un-processed" when providing
data_transformers
in order to avoid "double scaling" of the series.This PR is based on #2021.