Predicting Multiple Time Steps in a Time Series Using LSTM in Keras
I want to predict, for example, the k
following points in a time series using the LSTM in Keras. I am creating a dataset starting at the beginning of a list containing all points, choosing 0:p-1
points as input functions and next k
ie points p:p+k-1
as output functions. I continue this procedure by taking 1:p
both input functions and ... Finally, I get two dataframes X
, input txp
and y
output txk
. So my problem has a many-to-many structure based on here .
X = X.values.reshape(X.shape[0], 1, X.shape[1])
y = y.values.reshape(y.shape[0], 1, y.shape[1])
and then the first layer of my network:
model.add(LSTM(neurons, input_shape=(X.shape[1], X.shape[2]), return_sequences=True))
But here the time step is 1. My question is how can I increase the time intervals. Do I have to replicate some lines in X
and y
? Am I doing it right?
source to share
No one has answered this question yet
Check out similar questions: