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.
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.
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. ...
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.
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.
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 :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With