Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 631
user6460588 Avatar asked Mar 17 '17 10:03

user6460588


People also ask

Can LSTM be used for multivariate forecasting?

I was trying to forecast the future values of a variable where it not only depends on the previous values of itself but it also depends on the previous/current values of the other variables.

Is LSTM univariate or multivariate?

alternative univariate LSTM models and ten multivariate LSTM models were listed in Table 4. The results show that the model with 64 neurons and the SGD of univariate LSTM had the lowest RMSE for test set (RMSE = 11.20) in comparison with the models using other parameters. ...

Can LSTM be used for time series forecasting?

One of the most advanced models out there to forecast time series is the Long Short-Term Memory (LSTM) Neural Network. According to Korstanje in his book, Advanced Forecasting with Python: “The LSTM cell adds long-term memory in an even more performant way because it allows even more parameters to be learned.

How do you deal with multivariate time series forecasting?

To deal with MTS, one of the most popular methods is Vector Auto Regressive Moving Average models (VARMA) that is a vector form of autoregressive integrated moving average (ARIMA) that can be used to examine the relationships among several variables in multivariate time series analysis.


1 Answers

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 :-)

like image 153
Nassim Ben Avatar answered Oct 14 '22 13:10

Nassim Ben