Random Walk-Informed LSTM for Time Series Forecasting

Implements a Random Walk (RW)-informed Long Short-Term Memory (LSTM) network for univariate time series forecasting. The LSTM is trained on the full series with a composite loss that blends the usual mean squared error (MSE) between predictions and observations with the MSE between predictions and the fitted Random Walk, weighted by a parameter lambda (0 gives a standard LSTM, 1 gives a fully RW-guided LSTM). The Random Walk, either simple or with drift, is selected automatically by its in-sample root mean squared error (RMSE), and the lambda value with the lowest training RMSE is retained. The LSTM hyperparameters can be supplied manually or tuned by grid search, and functions for out-of-sample forecasting, accuracy measures and plots are provided. The methodology is motivated by hybrid forecasting framework proposed by Yeasin and Paul (2024) .


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("RWInfoLSTM")

0.1.0 by Ranjit Kumar Paul, 18 hours ago


Browse source code at https://github.com/cran/RWInfoLSTM


Authors: Md Yeasin [aut] , Ranjit Kumar Paul [aut, cre] , Pushkar Bora [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports torch, coro, ggplot2, cli, stats, utils

Suggests testthat


See at CRAN