View source: R/weighted_jaccard.R
| c_weighted_jaccard_dense | R Documentation |
Compute the full weighted Jaccard similarity matrix for a
dgCMatrix, returning a dense matrix (or a
dist-layout vector).
c_weighted_jaccard_dense(
x,
transpose = FALSE,
threads = NULL,
triangle = FALSE,
distance = FALSE
)
x |
A dgCMatrix (sparse column-compressed matrix) |
transpose |
If |
threads |
Number of threads for parallel computation. The default
|
triangle |
If |
distance |
If |
Uses an adaptive dense accumulation strategy: for small output matrices a feature-oriented loop, switching to a column-oriented loop for larger outputs for better cache performance.
A dense numeric similarity matrix, or a numeric vector in
dist layout when triangle = TRUE.
c_weighted_jaccard_sparse for the sparse equivalent
## Not run:
library(Matrix)
m <- sparseMatrix(i = c(1,2,1,2,3,3), j = c(1,1,2,2,2,3),
x = c(4,2,1,3,3,1), dims = c(3,3))
c_weighted_jaccard_dense(m)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.