user6460588
user6460588

Reputation: 144

Input LSTM on multivariate time series

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

Answers (1)

Nassim Ben
Nassim Ben

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

Related Questions