## “Time series forecasting is typically discussed where only a one-step prediction is required. What about when you need to predict multiple time steps into the future? Predicting multiple time steps into the future is called multi-step time series forecasting.”

Multistep-ahead prediction is the task of predicting a sequence of values in a time series. A typical approach, known as multi-stage prediction, is to apply a predictive model step-by-step and use the predicted value of the current time step to determine its value in the next time step. Many time series problems involve the task of predicting a sequence of future values using only the values observed in the past. Examples of this task, which is known as multistep-ahead time series prediction, include predicting the time series for stock prices, traffic volume, and electrical power consumption etc. By knowing the sequence of future values, we may derive interesting properties of the time series such as its projected amplitude, variability, onset period, and frequency of abnormally high or low values. For example, multistep-ahead time series prediction allows us to forecast the growing period of corn for next year, the maximum and minimum temperature for next month etc.

Temperature for consecutive days : 45, 51, 42, 47, 43, 48, 52

Considering the data above, a single-step forecast would require the forecast for Day 8 only, while a multistep forecast would require to predict the temperature data for multiple days (say Day 8,9,10,…..).

A typical approach to solve this problem is to construct a single model from historical values of the time series and then apply the model step by step to predict its future values. This approach is known as multi-stage prediction. Since it uses the predicted values from the past, it can be shown empirically that multi-stage prediction is susceptible to the error accumulation problem, i.e., errors committed in the past are propagated into future predictions.

Till now we know that multi-step ahead involves using the past data available to predict the values for multiple time steps in future. So if we talk more about data which we use, both univariate and multivariate data can be used for multi-step ahead prediction. In the multivariate case, the data point at a time t having r components can be represented as Xt = (x1, x2,……., xr).

Now, let us look at the strategies for multi-step forecasting :

• Direct Multi-Step Forecast Strategy

The direct method involves developing a separate model for each forecast time step. In the case of predicting the temperature for the next two days, we would develop a model for predicting the temperature on day 1 and a separate model for predicting the temperature on day 2.

An example of this strategy can be represented as below :

prediction(t+1) = model1(obs(t-1), obs(t-2), …, obs(t-n))       – (1)

prediction(t+2) = model2(obs(t-2), obs(t-3), …, obs(t-n))       – (2)

Having one model for each time step is an added computational and maintenance burden, especially as the number of time steps to be forecasted increases beyond the trivial. Because separate models are used, it means that there is no opportunity to model the dependencies between the predictions, such as the prediction on day 2 being dependent on the prediction on day 1, as is often the case in time series.

• Recursive Multi-Step Forecast Strategy :

The recursive strategy involves using a one-step model multiple times where the prediction for the prior time step is used as an input for making a prediction on the following time step. In the case of predicting the temperature for the next two days, we would develop a one-step forecasting model. This model would then be used to predict day 1, then this prediction would be used as an observation input in order to predict day 2.

An example of this strategy can be represented as below :

prediction(t+1) = model(obs(t-1), obs(t-2), …, obs(t-n))            – (3)

prediction(t+2) = model(prediction(t+1), obs(t-1), …, obs(t-n)) -(4)

Because predictions are used in place of observations, the recursive strategy allows prediction errors to accumulate such that performance can quickly degrade as the prediction time horizon increases.

Example graph for these forecast: • Direct Recursive Hybrid Forecast Strategy :

The direct and recursive strategies can be combined to offer the benefits of both methods. For example, a separate model can be constructed for each time step to be predicted, but each model may use the predictions made by models at prior time steps as input values. We can see how this might work for predicting the temperature for the next two days, where two models are used, but the output from the first model is used as an input for the second model.

An example of this strategy can be represented as below :

prediction(t+1) = model1(obs(t-1), obs(t-2), …, obs(t-n))           – (5)

prediction(t+2) = model2(prediction(t+1), obs(t-1), …, obs(t-n))-(6)

Combining the recursive and direct strategies can help to overcome the limitations of each of them.

• Multiple Output Strategy :

The multiple output strategy involves developing one model that is capable of predicting the entire forecast sequence in a one-shot manner. In the case of predicting the temperature for the next two days, we would develop one model and use it to predict the next two days as one operation.

An example of this strategy can be represented as below :

prediction(t+1), prediction(t+2) = model(obs(t-1), obs(t-2), …, obs(t-n))                                                                                 – (7)

Multiple output models are more complex as they can learn the dependence structure between inputs and outputs as well as between outputs. Being more complex may mean that they are slower to train and require more data to avoid overfitting the problem.

What did we learn till now ?

In this post we discovered strategies that we can use to make multiple-step time series forecasts. We learned to train multiple parallel models in the direct strategy or reuse a one-step model in the recursive strategy, and how to combine the best parts of the direct and recursive strategies in the hybrid strategy, and how to predict the entire forecast sequence in a one-shot manner using the multiple output strategy.

Follow up in next article – As we now have a good idea about multi-step ahead prediction in a theoretical sense, we will see how to correlate multi-step ahead prediction with Recurrent Neural Networks and LSTM as these methodologies are mostly used to capture sequential and time-based data. We will also see how to build methodologies based on both univariate and multivariate time series data.