# How should I design the LSTM architecture for multivariate time series forecasting problems?

There is plenty of literature describing LSTMs in a lot of detail and how to use them for multi-variate or uni-variate forecasting problems. What I couldn't find though, is any papers or discussions describing time series forecasting where we have correlated forecast data.

An example is best to describe what I mean. Say I wanted to predict number of people at a beach for the next 24 hours and I want to predict this in hourly granularity. This quantity of people would clearly depend on the past quantity of people at the beach as well as the weather. Now I can make an LSTM architecture of some sort to predict these future quantities based upon what happened in the past quite easily. But what if I now have access to weather forecasts for the next 24 hours too? (and historical forecast data too).

The architecture I came up with looks like this: I guess my question is, has anyone seen any literature around on this topic and/ or knows a better way to solve these sort of multivariate time series forecasting problems and is my method okay or completely flawed?

I have not come across a model like this yet. BUT

If you have not tried smaller models I'd recommend trying that first.

Justification: this lets you uselearning curvesto diagnose what to do next.

Also, you might try starting with a GRU (the LSTM overhead may not be needed).

One Idea for a starting model

Observe that turnoutdoes notaffect weather. So the weather forecast model will be independent of the turnout model but not vice versa.

(Note: I'm using RNN to denote which ever recurrent architecture you choose)

Formulation for simultaneous prediction:

Weather

$$\text{RNN}_w$$你的天气prediction model

$$\hat w_t = \text{RNN}_w(\hat w_{t-1})$$be the predicted weather at time$$t$$

Turnout: The idea here is that people will or will not go to the beach for various reasons (overcrowded, too hot or stormy etc). So in the beach population prediction task we use all these asfeaturesto predict the population at the next time-step. This reduces the problem to any one of the classical models already developed.

$$\text{RNN}_p$$is your turnout (beach population) prediction model

$$\hat p_t$$be the predicted turnout at time$$t$$

$$\hat c_t=[\hat p_t, \hat w_t]$$is the concatenation at time t

$$\hat p_{t+1} = \text{RNN}_p(\hat c_t)$$

Formulation in the presence of weather forecast:

Simply replace$$\hat w_t$$with the true weather forecasts$$\hat f_t$$.

A final warning

Unless you think your RNN is better at weather prediction than the forecasting systems I wouldnotrecommend using$$\text{RNN}_w$$in a production application.

I hope this helps.