extended_lnlp | R Documentation |
extended_lnlp
performs the regularized S-map introduced in Censi et al. (2019) Methods in Ecology and Evolution. Multivariate S-map is also supported.
extended_lnlp(
block_time,
lib = c(1, NROW(block_time)),
pred = lib,
tp = 1,
target_column = 1,
lib_column = 1:NCOL(block_time),
num_neighbors = NCOL(block_time) + 1,
theta = 0,
dist_w = NULL,
regularized = FALSE,
lambda = NULL,
alpha = 0,
glmnet_parallel = FALSE,
random_seed = NULL,
save_smap_coefficients = FALSE
)
block_time |
Dataframe or matrix. Original time series. |
lib |
Numeric vector. Library indices. |
pred |
Numeric vector. Prediction indices. |
tp |
Forecasting time ahead. |
target_column |
Numeric. Indicates target column |
lib_column |
Numeric. Indicates library column |
num_neighbors |
Numeric. The number of nearest neighbors. |
theta |
Numeric. Weighing function for S-map. |
dist_w |
Matrix. Distance matrix used to calculate weights for S-map. Implemented for MDR S-map (Chang et al. 2021) Ecology Letters. If |
regularized |
Logical If |
lambda |
Numeric. Specify the strength of penalty in the regularization. |
alpha |
Numeric. |
glmnet_parallel |
Logical. If TRUE, the computation will be parallel (currently, experimental). |
random_seed |
Numeric. Random seed. |
save_smap_coefficients |
Logical. If |
Cenci, S, Sugihara, G, Saavedra, S. Regularized S-map for inference and forecasting with noisy ecological time series. Methods Ecol Evol. 2019; 10: 650– 660. https://doi.org/10.1111/2041-210X.13150
A list containing:
model_output | Model predictions |
stats | Statistics. |
smap_coefficients | S-map coefficients |
# extended_lnlp()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.