-
Notifications
You must be signed in to change notification settings - Fork 360
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
[Recurrent Models] do not support step_size > 1 #1145
Comments
It is expected. Recurrent models (or recursive models) predict one-step ahead and use that prediction to make the next prediction. Therefore, |
hello, IMHO and keeping this |
@JoaquinDF-UniLU #1023 should fix this. |
What happened + What you expected to happen
I am running a cross-validation with:
neuralforecast.cross_validation(df=df, n_windows=n_windows, step_size=step_size)
n_windows = 30 and step_size = 48 (I have 30' min data) and the models use horizon=48.
I get
Exception: Recurrent models do not support step_size > 1
The error happens when I select any recurrent
BaseRecurrent
model but this was particularly when I used an LSTM.Is this expected? if so, why?
How can I cross validate recurrent models with step_size larger then 1.
Should it be handled by the cross_val function that rolls the predicts of the
BaseRecurrent
models?Best regards.
Versions / Dependencies
Neuralforecast 1.7.2
Reproduction script
import numpy as np
from neuralforecast import NeuralForecast
from neuralforecast.models import LSTM
Y_df = pd.read_parquet('https://datasets-nixtla.s3.amazonaws.com/m4-hourly.parquet')
uids = Y_df['unique_id'].unique()[:10] # Select 10 ids to make the example faster
Y_df = Y_df.query('unique_id in @uids').reset_index(drop=True)
nf = NeuralForecast(
models=[
LSTM(h=48,scaler_type='standard',max_steps=100) ],
freq=1
)
cv_df = nf.cross_validation(Y_df, n_windows=2,step_size=48)
Issue Severity
None
The text was updated successfully, but these errors were encountered: