template_similarity: template_similarity

View source: R/similarity.R

template_similarityR Documentation

template_similarity

Description

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,
  ...
)

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 and source_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", "emd" (default is "spearman").

permutations

A numeric value specifying the number of permutations for the baseline map (default is 10).

...

Extra arguments to pass to the 'similarity' function.

Value

A data frame or tibble containing the source table and additional columns with the similarity scores and permutation results.


bbuchsbaum/eyesim documentation built on June 10, 2025, 8:17 p.m.