This function is meant to be called from within compute_smap_coeffs(), which also pre-generates the block so that the first variable is to be predicted, and the remaining columns are the causal variables and lags of the predicted variable. This function searches over the values of theta for the best fit (by lowest MAE), and then returns the data.frame with the s-map coefficients

get_smap_coefficients(block, lib = c(1, NROW(block)), pred = c(1,
  NROW(block)), theta = c(seq(0, 1, by = 0.1), seq(1.5, 10, by = 0.5)))

Arguments

block

the input data with time delays already generated

lib

a 2-column matrix (or 2-element vector) where each row specifies the first and last *rows* of the time series to use for attractor reconstruction

pred

(same format as lib), but specifying the sections of the time series to forecast.

theta

the nonlinear tuning parameter (theta is only relevant if method == "s-map")

Value

the data.frame with the s-map coefficients