optimal parameter search for pattern causality
# S4 method for sf
pc(
data,
column,
target,
E = 2:10,
k = E + 2,
tau = 1,
style = 1,
lib = NULL,
pred = NULL,
dist.metric = "L2",
zero.tolerance = max(k),
relative = TRUE,
weighted = TRUE,
maximize = "positive",
threads = detectThreads(),
detrend = FALSE,
nb = NULL
)# S4 method for SpatRaster
pc(
data,
column,
target,
E = 2:10,
k = E + 2,
tau = 1,
style = 1,
lib = NULL,
pred = NULL,
dist.metric = "L2",
zero.tolerance = max(k),
relative = TRUE,
weighted = TRUE,
maximize = "positive",
threads = detectThreads(),
detrend = FALSE,
grid.coord = TRUE
)
A list
xmapcross mapping performance
varnamename of target variable
methodmethod of cross mapping
maximizemaximized causality metric
observation data.
name of library variable.
name of target variable.
(optional) embedding dimensions.
(optional) number of nearest neighbors used.
(optional) step of spatial lags.
(optional) embedding style (0 includes current state, 1 excludes it).
(optional) libraries indices (input needed: vector - spatial vector, matrix - spatial raster).
(optional) predictions indices (input requirement same as lib).
(optional) distance metric (L1: Manhattan, L2: Euclidean).
(optional) maximum number of zeros tolerated in signature space.
(optional) whether to calculate relative changes in embeddings.
(optional) whether to weight causal strength.
(optional) causality metric to maximize: one of "positive", "negative", or "dark".
(optional) number of threads to use.
(optional) whether to remove the linear trend.
(optional) neighbours list.
(optional) whether to detrend using cell center coordinates (TRUE) or row/column numbers (FALSE).
Stavroglou, S.K., Pantelous, A.A., Stanley, H.E., Zuev, K.M., 2020. Unveiling causal interactions in complex systems. Proceedings of the National Academy of Sciences 117, 7599–7605.
columbus = sf::read_sf(system.file("case/columbus.gpkg",package="spEDM"))
# \donttest{
pc(columbus,"hoval","crime",E = 5:10,maximize = "negative")
# }
Run the code above in your browser using DataLab