How to Use Timesteps in LSTM Networks for Time Series Forecasting

Last Updated on August 28, 2020

The Long Short-Term Memory (LSTM) network in Keras supports time steps.

This raises the question as to whether lag observations for a univariate time series can be used as time steps for an LSTM and whether or not this improves forecast performance.

In this tutorial, we will investigate the use of lag observations as time steps in LSTMs models in Python.

After completing this tutorial, you will know:

  • How to develop a test harness to systematically evaluate LSTM time steps for time series forecasting.
  • The impact of using a varied number of lagged observations as input time steps for LSTM models.
  • The impact of using a varied number of lagged observations and matching numbers of neurons for LSTM models.

Kick-start your project with my new book Deep Learning for Time Series Forecasting, including step-by-step tutorials and the Python source code files for all examples.

Let’s get started.

  • Updated Apr/2019: Updated the link to dataset.