8
votes

I am trying to use LSTM for time series predictions on multivariate data. I have 50000 samples with 15 dimensions. I want to use look back of 10. What will be the shape of input to LSTM layer. Will it be

(samples,look back,dimension) = (50000,10,15) 

or

(samples,dimension, look back) = (50000,15,10)

I am using Keras.

1

1 Answers

10
votes

As you can read in the Keras documentation :

Input shapes

3D tensor with shape (batch_size, timesteps, input_dim).

So the 'time' dimension is first. Since your time dimension is 10, your input shape will be (50000,10,15)

I hope this helps :-)