Description
Time Series Forecasting Using GRNN.
Description
A general regression neural network (GRNN) is a variant of a Radial Basis Function Network characterized by a fast single-pass learning. 'tsfgrnn' allows you to forecast time series using a GRNN model Francisco Martinez et al. (2019) <doi:10.1007/978-3-030-20521-8_17> and Francisco Martinez et al. (2022) <doi:10.1016/j.neucom.2021.12.028>. When the forecasting horizon is higher than 1, two multi-step ahead forecasting strategies can be used. The model built is autoregressive, that is, it is only based on the observations of the time series. You can consult and plot how the prediction was done. It is also possible to assess the forecasting accuracy of the model using rolling origin evaluation.
README.md
tsfgrnn
The goal of tsfgrnn is to forecast time series using GRNN regression.
Installation
You can install the released version of tsfgrnn from CRAN with:
install.packages("tsfgrnn")
And the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("franciscomartinezdelrio/tsfgrnn")
Example
This is a basic example which shows how to forecast with tsfgrnn:
library(tsfgrnn)
pred <- grnn_forecasting(USAccDeaths, h = 12)
pred$prediction # To see a time series with the forecasts
#> Jan Feb Mar Apr May Jun Jul
#> 1979 8148.640 7237.667 8131.874 8466.715 9440.860 9793.261 10896.977
#> Aug Sep Oct Nov Dec
#> 1979 10184.601 9463.049 9412.852 8985.240 9583.652
plot(pred) # To see a plot with the forecast
To know more, the open access paper Francisco Martinez et al. (2022) describes the package. Also, you can read the package’s vignette.
Acknowledgements
Funds: This work was partially supported by the project TIN2015-68854-R (FEDER Founds) of the Spanish Ministry of Economy and Competitiveness.