-
Notifications
You must be signed in to change notification settings - Fork 881
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
[BUG] historical_forecasts() can't handle timeseries with rangeindex that doesn't start at 0 #974
Comments
Could you try not splitting your future covariates in training and validation? Keep the full-length series and try again. Darts will slice it for you. I suspect this error might be due to a covariate series that's too short. |
Error persist in Darts Version 0.21 The problem exists with historical_forecasts() it gives an error I fixed it by reindexing the series to start with 0, but this negate the reason why index is used in the first place. My current model is TFT and it autoencode the index and use it, wouldn't re-indexing mess up the results? P.S. last time I fixed it by re-indexing from 0. |
Hi, I suspect that your series starting at 1 does not contain the necessary time steps (its last time step is too early). |
Hey @hrzn, sadly that's not the case here.
Running this code will give you an error: but change the value of the variable start to be 0, everything runs smoothly. ============================================================================== Additionally, I noticed weird behavior:1 - when you set 2 - when I set shall I open different tickets for these errors with the same code? |
Many thanks! That's an issue, I'll fix it. |
@hrzn Thanks a lot for your efforts. |
Describe the bug
There is a problem with
RegressionModel
and timeseries that have range index that does not start at one.When trying to use any method (
predict
,historical_forecasts
,backtest
) I get errors, which goes away when I create a pandas date range index.To Reproduce
Expected behavior
To work normally and not to produce any errors
System (please complete the following information):
Additional context
series 0, series 1, series 2 shape = (360090, 1)
error in case of
backtest
andhistorical_forecasts
:Error in case of
predict
:The text was updated successfully, but these errors were encountered: