predict.grnnForecast: Predict method for GRNN models for time series forecasting.

View source: R/forecasting.R

predict.grnnForecastR Documentation

Predict method for GRNN models for time series forecasting.

Description

Predicted values based on a GRNN model for time series forecasting.

Usage

## S3 method for class 'grnnForecast'
predict(object, h, ...)

Arguments

object

a grnnForecast object obtained by a call to the grnn_forecasting function.

h

an integer. The forecasting horizon.

...

further arguments passed to or from other methods.

Details

If the models uses the MIMO strategy for multiple-step ahead prediction, the forecasting horizon is fixed to the model forecasting horizon.

Value

a grnnForecast object with the prediction and information about the GRNN model, see the documentation of grnn_forecasting for the structure of grnnForecast objects.

Examples

pred <- grnn_forecasting(UKgas, h = 4, msas = "MIMO")
new_pred <- predict(pred, h = 4)
print(new_pred$prediction)
plot(new_pred) # To see a plot with the forecast


tsfgrnn documentation built on March 31, 2023, 8:20 p.m.