0
$\begingroup$

This question already has an answer here:

I'm doing Long-Short-Term-Memory (LSTM) to forecast time series. I was wondering, could we add x-reg part to an LSTM model? Like adding an X-Reg part to and ARIMA model?

Say I have a response monthly time series y (for about 10~20 years observation). And say I have about 400 signals (predictor time series). Should I do feature-selection and regression first and then use LSTM to model the residuals?

Or is this the wrong way to add predictors to LSTM?

Thank you!

$\endgroup$

marked as duplicate by Sycorax, kjetil b halvorsen, mdewey, Michael Chernick, jbowman Aug 1 '18 at 20:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ You can just add them as additional inputs to your LSTM. It's actually much more straightforward than with ARIMA or ETS. $\endgroup$ – Skander H. Jul 20 '18 at 21:54
  • $\begingroup$ Hi Alex, Could you give an example on how to add xreg to LSTM? if my "dim(y_train_arr)" is [105,1], and I have 2 predictors, what should my "dim(x_train_arr)" be? [105,3,1] or [105,1,3]? $\endgroup$ – Chenying Gao Jul 27 '18 at 14:37
  • $\begingroup$ That will depend on what too you are using for LSTM. $\endgroup$ – Skander H. Jul 30 '18 at 23:20