0

I started studying Tensorflow not so long ago and figured out the problems of using LSTM for forecasting time series. There are many simple and detailed examples with working code. However, in these examples, like this one, the forecast is made for the future from the previous values ​​of the target value. I want to complicate the task a little, but I do not understand how.

For example, in a power usage task, I can add weather forecast ​​to correct the LSTM forecast. But I do not understand how to do this, since I am training the model on N * M matrix, where N is the number of time series, and K is the number of my predictors. And when I call the

model.predict(...)

It also needs to input N * K matrix (but for the previous interval), but I also have forecast data for other parameters in the N * (K-1) matrix. I can just show it in the illustration below.

Values in table are random

My goal is to add some known future parameters to improve the forecast which I can get using only LSTM with previous values.

So how can I use the future values of other variables to forecast e.g. the power usage in the same time-series as future temperature forecast values that I have?

Greg
  • 241
  • 2
  • 4
  • 8
  • Does this answer your question? [How to include future values in a time series prediction of a RNN in Keras](https://stackoverflow.com/questions/70361179/how-to-include-future-values-in-a-time-series-prediction-of-a-rnn-in-keras) – Flavia Giammarino Jan 14 '22 at 09:44

1 Answers1

0

Your model needs two different segments.

The first segment should take in the past and generate some output maybe with shape (N, Tout).

The second segment should take the future inputs, and the outputs of the first segment and combine them to make the final predictions. Maybe by concatenating them together.

mdaoust
  • 6,242
  • 3
  • 28
  • 29