block_lnlp uses multiple time series given as input to generate an
attractor reconstruction, and then applies the simplex projection or s-map
algorithm to make forecasts. This method generalizes the simplex and
s-map routines, and allows for "mixed" embeddings, where multiple time
series can be used as different dimensions of an attractor reconstruction.
block_lnlp(block, lib = c(1, NROW(block)), pred = lib, norm_type = c("L2 norm", "L1 norm", "P norm"), P = 0.5, method = c("simplex", "s-map"), tp = 1, num_neighbors = "e+1", columns = NULL, target_column = 1, stats_only = TRUE, first_column_time = FALSE, exclusion_radius = NULL, epsilon = NULL, theta = NULL, silent = FALSE, save_smap_coefficients = FALSE, short_output = FALSE)| cols |
| embedding |
| tp |
| prediction horizon |
| nn |
| number of neighbors |
| num_pred |
| number of predictions |
| rho |
| correlation coefficient between observations and predictions |
| mae |
| mean absolute error |
| params |
| data.frame of parameters (E, tau, tp, nn) |
| model_output |
| data.frame with columns for the time index, observations, and predictions |
| smap_coefficients |
| matrix with the s_map coefficients (first E columns are for the E lags, and the (E+1)th column is the constant) |
| stats |
| data.frame of forecast statistics (num_pred, rho, mae, rmse) |
norm_type "L2 norm" (default) uses the typical Euclidean distance: $$distance(a,b) := \sqrt{\sum_i{(a_i - b_i)^2}}$$ norm_type "L1 norm" uses the Manhattan distance: $$distance(a,b) := \sum_i{|a_i - b_i|}$$ norm type "P norm" uses the P norm, generalizing the L1 and L2 norm to use $p$ as the exponent: $$distance(a,b) := \sum_i{(a_i - b_i)^p}^{1/p}$$
method "simplex" (default) uses the simplex projection forecasting algorithm
method "s-map" uses the s-map forecasting algorithm
data("two_species_model")
block <- two_species_model[1:200,]
block_lnlp(block, columns = c("x", "y"), first_column_time = TRUE)
Run the code above in your browser using DataLab