This function trains an Echo State Network (ESN) to a univariate time series.
Numeric vector containing the response variable.
Integer vectors with the lags associated with the input variable.
Character value. The information criterion used for variable selection inf_crit = c("aic", "aicc", "bic")
.
Integer vector. The nth-differences of the response variable.
Integer value. The number of internal states per reservoir.
Integer value. The maximum number of (random) models to train for model selection.
Integer value. The number of observations of internal states for initial drop out (throw-off).
Integer value. The seed for the random number generator (for reproducibility).
Numeric value. The leakage rate (smoothing parameter) applied to the reservoir.
Numeric value. The spectral radius for scaling the reservoir weight matrix.
Numeric value. The connectivity of the reservoir weight matrix (dense or sparse).
Numeric vector. Lower and upper bound of lambda sequence for ridge regression.
Numeric value. The lower and upper bound of the uniform distribution for scaling the input weight matrix.
Numeric value. The lower and upper bound of the uniform distribution for scaling the reservoir weight matrix.
Numeric vector. The lower and upper bound for scaling the time series data.
A list
containing:
actual
: Numeric vector containing the actual values.
fitted
: Numeric vector containing the fitted values.
resid
: Numeric vector containing the residuals.
states_train
: Numeric matrix containing the internal states.
method
: A list
containing several objects and meta information of the trained ESN (weight matrices, hyperparameters, model metrics, etc.).
xdata <- as.numeric(AirPassengers)
xmodel <- train_esn(y = xdata)
summary(xmodel)
#>
#> --- Layers -----------------------------------------------------
#> n_inputs = 1
#> n_states = 57
#> n_outputs = 1
#>
#> --- Meta ---------------------------------------------------
#> lags = 1
#> n_diff = 1
#> n_models = 114
#>
#> --- Scaling ----------------------------------------------------
#> scale_inputs = [-0.5, 0.5]
#> scale_win = [-0.5, 0.5]
#> scale_wres = [-0.5, 0.5]
#>
#> --- Hyperparameters --------------------------------------------
#> alpha = 1
#> rho = 1
#> density = 0.5