2

I am trying to understand interpretation of timestamp in Keras LSTM, for prediction longer period of time in forecasting.

I already read a lot of papers found in internet, and also here in stackoverflow (Understanding Keras LSTMs I am still confused. I implemented Keras with timestamp = 1 and predicting the weather with shift for 1 hour. The prediction is actually really good, what I have expected.

The problem occured in the moment when I am trying to predict wheather shifted for 12 hours. I am not sure how Keras is interpreting the backpropagation in this situation. How Keras is actually "remember" the previous data.

I have 7 columns with different type of data. I am putting 8th one as predicted output. My reshape is prepared like below:

#reshape((samples, timestamp, features))
train_X = train_X.reshape((train_X.shape[0], 1, train_X.shape[1]))
test_X= train_X.reshape((train_X.shape[0], 1, train_X.shape[1]))

For prediction 12hours should it look like below ?

train_X = train_X.reshape((train_X.shape[0], 12, train_X.shape[1]))
test_X= train_X.reshape((train_X.shape[0], 12, train_X.shape[1]))

I would like to get more details about this part of Keras LSTM implementation

mmalak
  • 107
  • 4
  • 14

0 Answers0