| similarity | R Documentation |
Similarity
similarity(x, y, type = c("jaccard", "tanimoto", "ruzicka"), ...)
x |
A numeric or logical vector. |
y |
A numeric or logical vector. |
type |
The type of the similarity measure. |
... |
Optional arguments. |
The following types of similarity measures are implemented:
Jaccard: |x intersect y| / |x union y|
Tanimoto:
Ruzicka: \sum min(x_i, y_i) / \sum max(x_i, y_i)
The similarity between x and y.
Other Utils:
as_ANN_matrix(),
degree(),
distance(),
list_as_numeric(),
probability(),
radian(),
random_seed(),
re.factor(),
sd_pop(),
var_pop(),
vector_as_ANN_matrix(),
vector_as_numeric()
similarity(c(1L, 1L, 0L), c(0L, 1L, 1L), type = "jaccard", set = TRUE)
similarity(c(1L, 1L, 0L), c(0L, 1L, 1L), type = "tanimoto")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.