template_similarity
template_similarity.Rd
Compute similarity between each density map in a source_tab
with a matching ("template") density map in ref_tab
.
Usage
template_similarity(
ref_tab,
source_tab,
match_on,
permute_on = NULL,
refvar = "density",
sourcevar = "density",
method = c("spearman", "pearson", "fisherz", "cosine", "l1", "jaccard", "dcov", "emd"),
permutations = 10,
multiscale_aggregation = "mean",
...
)
Arguments
- ref_tab
A data frame or tibble containing reference density maps.
- source_tab
A data frame or tibble containing source density maps.
- match_on
A character string representing the variable used to match density maps between
ref_tab
andsource_tab
.- permute_on
A character string representing the variable used to stratify permutations (default is NULL).
- refvar
A character string representing the name of the variable containing density maps in the reference table (default is "density").
- sourcevar
A character string representing the name of the variable containing density maps in the source table (default is "density").
- method
A character string specifying the similarity method to use. Possible values are "spearman", "pearson", "fisherz", "cosine", "l1", "jaccard", and "dcov" (default is "spearman").
- permutations
A numeric value specifying the number of permutations for the baseline map (default is 10).
- multiscale_aggregation
If the density maps are multiscale (i.e., `eye_density_multiscale` objects), this specifies how to aggregate similarities from different scales. Options: "mean" (default, returns the average similarity across scales), "none" (returns a list or vector of similarities, one per scale, within the result columns). See `similarity.eye_density_multiscale`.
- ...
Extra arguments to pass to the `similarity` function.