Reputation: 144
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.
Upvotes: 8
Views: 3624
Reputation: 11553
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 :-)
Upvotes: 10