plot.forecast_esn: Plot point forecasts and actual values of a trained ESN...

View source: R/methods-base.R

plot.forecast_esnR Documentation

Plot point forecasts and actual values of a trained ESN model.

Description

Plot point forecasts, actual and fitted values of a trained ESN model as line chart. Optionally, test data (out-of-sample) can be added to the plot.

Usage

## S3 method for class 'forecast_esn'
plot(x, test = NULL, fitted = TRUE, interval = TRUE, n_obs = NULL, ...)

Arguments

x

An object of class forecast_esn.

test

Numeric vector. Test data, i.e., out-of-sample actual values.

fitted

Logical value. If TRUE, fitted values are added.

interval

Logical value. If TRUE, forecast intervals are added.

n_obs

Integer value. If NULL, all in-sample values are shown, otherwise only the last n_obs.

...

Currently not in use.

Value

Line chart of point forecast and actual values.

Examples

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


ahaeusser/echos documentation built on June 2, 2025, 2:17 a.m.