You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There is a bug when calling historical_forecasts on a RegressionModel that uses encoders with a non-divisible frequency RegressionModels and non-overlapping maximum lag with the target lags.
To Reproduce
from darts.models import LinearRegressionModel
from darts.datasets import AirPassengersDataset
model = LinearRegressionModel(
lags=3,
lags_past_covariates=[-3, -2],
add_encoders={
"cyclic": {"past": ["month"]},
}
)
series = AirPassengersDataset().load()
hc = model.historical_forecasts(series=series)
Expected behavior
Should not raise an error. The error
System (please complete the following information):
Python version: [e.g. 3.10]
darts version [master]
Additional context
The error can be avoided by passing series also as past_covariates to historical forecasts. Reason is that encoders are generated on the fly with minimum time span requirements -> we have to calculate the expected start index of covariates because it is not available in the time index generated by the encoders.
The text was updated successfully, but these errors were encountered:
Describe the bug
There is a bug when calling historical_forecasts on a RegressionModel that uses encoders with a non-divisible frequency RegressionModels and non-overlapping maximum lag with the target lags.
To Reproduce
Expected behavior
Should not raise an error. The error
System (please complete the following information):
Additional context
The error can be avoided by passing
series
also aspast_covariates
to historical forecasts. Reason is that encoders are generated on the fly with minimum time span requirements -> we have to calculate the expected start index of covariates because it is not available in the time index generated by the encoders.The text was updated successfully, but these errors were encountered: