/LSTM-network-for-time-series-forecasting

A simple Vanilla LSTM model is demonstrated for time-series energy usage forecasting. Required formatting of data, building the LSTM model and walk-forward validation is demonstrated for multi-step forecasting.

Primary LanguageJupyter NotebookMIT LicenseMIT

LSTM-network-for-time-series-forecasting

Introduction

Long Short-Term Memory or LSTM is a special type of Recurrent Neural Network (RNN) that can be used for time-series forecasting. LSTM networks are capable of learning features from input sequences of data and can be used to predict multi-step sequences. In this example, a simple Vanilla LSTM architecture (an LSTM model with a single hidden LSTM layer and an output layer for prediction) is used for multistep time-series forecasting. For an excellent introduction to LSTMs, look up Deep Learning for Time Series Forecasting.

Getting Started

The LSTM_univariate_multistep_output_github.ipynb file is the main file for running the LSTM model. The publicly available time-series energy usage data of IIT, Delhi is sourced from here. Infromation on the data can be found in this article.

Note: The notebook files have been tested on Google Colab.

Model

The model is a simple Vanilla LSTM architecture:

lstm

Farecasting

Multi-step energy usage forecasting (12 weeks) with Vanilla-LSTM with a Root Mean Squared Error (RMSE) of 6.46. lstm_rmse