pair_dist | R Documentation |
Calculate a weighted distance (between two vectors) based on Jaccard's coefficient
pair_dist(x, y, weights)
x |
a vector of discrete values |
y |
a vector of discrete values |
weights |
a vector of non-negative alteration values |
a weighted distance based on Jaccard's coefficient. Ratio of the size of intersection to the size of the union of two sets after discarding 0-0 matches from the two vectors
Rileen Sinha (rileen@gmail.com), Augustin Luna (aluna@jimmy.harvard.edu)
n <- 100 x <- sample(c(0, 1), n, replace=TRUE) y <- sample(c(0, 1), n, replace=TRUE) weights <- rnorm(n) pair_dist(x, y, weights)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.