-
Notifications
You must be signed in to change notification settings - Fork 880
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
multiple TimeSeries for historical_forecasts(), residuals() and backtest() + automatic start #1318
Conversation
Thanks for the great work! Is there a apporximate time line for when this is going to be part of a realease? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1318 +/- ##
========================================
Coverage 93.81% 93.81%
========================================
Files 94 94
Lines 9436 9544 +108
========================================
+ Hits 8852 8954 +102
- Misses 584 590 +6 ☔ 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.
Looks great @dumjax, I only put minor comments.
Maybe the main one is a proposal to use a generator instead of eagerly filling up a list. I think this could scale better and avoid blocking calls until all results are computed. However, I think it could be done in a later PR, as this could maybe be done in other parts of Darts as well.
The second fairly important comment would be managing the progress tracking of the outer loop.
def extreme_lags( | ||
self, | ||
) -> Tuple[ | ||
Union[int, None], |
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.
I usually find it a bit clearer to write Optional[int]
instead of Union[int, None]
.
@@ -554,13 +903,14 @@ def backtest( | |||
] = metrics.mape, | |||
reduction: Union[Callable[[np.ndarray], float], None] = np.mean, | |||
verbose: bool = False, | |||
) -> Union[float, List[float]]: | |||
) -> Union[float, List[float], Sequence[float], List[Sequence[float]]]: | |||
|
|||
"""Compute error values that the model would have produced when |
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.
Same comments as for historical_forecasts() docstring
Co-authored-by: Julien Herzen <julien@unit8.co>
Co-authored-by: Julien Herzen <julien@unit8.co>
Co-authored-by: Julien Herzen <julien@unit8.co>
Co-authored-by: Julien Herzen <julien@unit8.co>
Co-authored-by: Julien Herzen <julien@unit8.co>
Co-authored-by: Julien Herzen <julien@unit8.co>
…co/darts into feat/multipleTS_historicalforecast
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 @dumjax 👏
I have made a few changes directly in your branch. I think we can merge...
Summary
Add the possibility to historical forecast, backtest and compute residuals on multiple time series.
Also automatically detects the starting point if
start
is not specified