| cosine_similarity | R Documentation |
Calculate cosine similarity of two vectors. Note: Much faster for pairwise comparisons than proxy::simil.
cosine_similarity(x, ...)
## S4 method for signature 'numeric'
cosine_similarity(x, y)
## S4 method for signature 'TermDocumentMatrix'
cosine_similarity(x, y = NULL, progress = TRUE, verbose = TRUE, mc = FALSE)
## S4 method for signature 'matrix'
cosine_similarity(
x,
how = c("proxy", "coop", "algebra"),
chunks = 1,
progress = TRUE,
verbose = TRUE,
mc = FALSE
)
## S4 method for signature 'big.matrix'
cosine_similarity(x)
x |
A matrix. |
... |
further parameters (for use with blapply) |
y |
simple triplet matrix |
progress |
logical |
verbose |
logical |
mc |
logical, or if numeric, providing number of cores |
how |
The tool/package chosen. |
chunks |
Number of chunks (numeric/integer value). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.