ewnet {epicasting} | R Documentation |
Ewnet: An Ensemble Wavelet Neural Network for Forecasting and Epicasting
Description
Ewnet: An Ensemble Wavelet Neural Network for Forecasting and Epicasting
Usage
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
)
Arguments
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). |
Value
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.
Author(s)
Madhurima Panja and Tanujit Chakraborty
References
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.
Examples
ewnet(ts = datasets::lynx, MaxARParam = 1, NForecast = 3)