forecast_esn {echos}R Documentation

Forecast an Echo State Network

Description

Forecast an Echo State Network (ESN) from a trained model via recursive forecasting. Forecast intervals are generated by simulating future sample path based on a moving block bootstrap of the residuals and estimating the quantiles from the simulations.

Usage

forecast_esn(
  object,
  n_ahead = 18,
  levels = c(80, 95),
  n_sim = 100,
  n_seed = 42
)

Arguments

object

An object of class esn. The result of a call to train_esn().

n_ahead

Integer value. The number of periods for forecasting (i.e. forecast horizon).

levels

Integer vector. The levels of the forecast intervals, e.g., 80% and 95%.

n_sim

Integer value. The number of future sample path generated during simulation.

n_seed

Integer value. The seed for the random number generator (for reproducibility).

Value

A list containing:

Examples

xdata <- as.numeric(AirPassengers)
xmodel <- train_esn(y = xdata)
xfcst <- forecast_esn(xmodel, n_ahead = 12)
plot(xfcst)

[Package echos version 1.0.2 Index]