pearson_correlation | R Documentation |
Correlation and covariance calculation for sparse matrix
pearson_correlation(x, y = NULL)
x |
Sparse matrix or character vector. |
y |
Sparse matrix or character vector. |
A list with covariance and correlation matrices.
m1 <- simulate_sparse_matrix(
100, 100
)
m2 <- simulate_sparse_matrix(
100, 100,
sparsity = 0.05
)
a <- pearson_correlation(m1, m2)
a$cov[1:5, 1:5]
a$cor[1:5, 1:5]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.