I am just studying tensorflow 2. Here is where I learned time series training on multiple lags using LSTM: https://machinelearningmastery.com/multivariate-time-series-forecasting-lstms-keras/

In this example, time series should be turned into classification format to use LSTM. For example, if the original data looks like:

date   a1   a2   target
1      1    2      0.2
2      2    3      0.3
3      3    4      0.5

Then, for lag=1, the data should be turned to:

       time t-1               time t-1
date   a1   a2   target    a1   a2   target
1      1    2      0.2     2    3      0.3
2      2    3      0.3     3    4      0.5

So if there is multiple lag, then the above data frame will include a lot of columns, corresponding to multiple time points.

This seems complex for me. But I am new to LSTM and tensorflow, I do not know if there is some other way to do this?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.