Title: | Ewnet: An Ensemble Wavelet Neural Network for Forecasting and Epicasting |
---|---|
Description: | Method and tool for generating time series forecasts using an ensemble wavelet-based auto-regressive neural network architecture. This method provides additional support of exogenous variables and also generates confidence interval. This package provides EWNet model for time series forecasting based on the algorithm by Panja, et al. (2022) and Panja, et al. (2023) <arXiv:2206.10696> <doi:10.1016/j.chaos.2023.113124>. |
Authors: | Madhurima Panja [aut], Tanujit Chakraborty [aut, cre, cph] |
Maintainer: | Tanujit Chakraborty <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.0 |
Built: | 2024-12-21 06:39:49 UTC |
Source: | CRAN |
Ewnet: An Ensemble Wavelet Neural Network for Forecasting and Epicasting
ewnet( ts, Waveletlevels = floor(log(length(ts))), MaxARParam, boundary = "periodic", FastFlag = TRUE, NForecast, NVal = 0, measure = Metrics::mase, PI = FALSE, xreg_train = NULL, xreg_test = NULL, ret_fit = FALSE )
ewnet( ts, Waveletlevels = floor(log(length(ts))), MaxARParam, boundary = "periodic", FastFlag = TRUE, NForecast, NVal = 0, measure = Metrics::mase, PI = FALSE, xreg_train = NULL, xreg_test = NULL, ret_fit = FALSE )
ts |
A numeric vector or time series |
Waveletlevels |
An integer specifying the levels of decomposition. The default is set to floor(log(length(ts))). |
MaxARParam |
An integer indicating the maximum lagged observations to be included in the neural network. The default is selected based on AIC using linear AR process. |
boundary |
A character string indicating which boundary method to use. boundary = "periodic" (default) and boundary = "reflection". |
FastFlag |
A logical flag which, if true (default), indicates that the pyramid algorithm is computed with an internal C function. Otherwise, only R code is used in all computations. |
NForecast |
An integer specifying the forecast horizon. |
NVal |
An integer indicating the size of validation set. Default is set to 0. |
measure |
The performance metric used for selecting the best value of |
PI |
A logical flag which, if true generates the confidence interval for the forecast horizon. Default is set to false. |
xreg_train |
Optionally, a vector or matrix of external regressors, which
must have the same number of rows as |
xreg_test |
Optionally, a vector or matrix of external regressors, which
must have the same number of rows as |
ret_fit |
A logical flag specifying that the fitted values of the model on the training set should be returned if true, otherwise, false (default). |
The parameters of the fitted model indicating the number of lagged observations
included in the model and the number of nodes in the hidden layer. The forecast of the
time series of size NForecast
is generated along with the optional output of
fitted values (ret_fit
= TRUE) and confidence interval (PI
= TRUE) for the forecast.
Madhurima Panja and Tanujit Chakraborty
Panja, M., Chakraborty, T., Kumar, U., & Liu, N. (2022). Epicasting: An ensemble wavelet neural network (ewnet) for forecasting epidemics. arXiv preprint arXiv:2206.10696. https://arxiv.org/abs/2206.10696
Panja, M., Chakraborty, T., Nadim, S. S., Ghosh, I., Kumar, U., & Liu, N. (2023). An ensemble neural network approach to forecast Dengue outbreak based on climatic condition. Chaos, Solitons & Fractals, 167, 113124.
ewnet(ts = datasets::lynx, MaxARParam = 1, NForecast = 3)
ewnet(ts = datasets::lynx, MaxARParam = 1, NForecast = 3)