Description Usage Arguments Value Examples
sparse_pca() performs a fast pca on a matrix while maintaining sparsity.
1 | sparse_pca(x, n_pcs, mu = NULL, s = NULL, center_scale = TRUE)
|
x |
a matrix of values to perform dimensionality reduction on; by default, rows are genes and columns are cells |
n_pcs |
number of prinicpal components to compute |
mu |
column means |
s |
column standard deviations |
center_scale |
perform centering and scaling |
A list containing "x" - The rotated data matrix where rows are barcodes and columns are PCs "sdev" - the standard deviations of the principal components (i.e., sqrt of eigvals of the covariance matrix) "rotation" - The loadings (eigenvectors) where each column is a PC "tot_var" - The total variation in the scaled and centered matrix (this is also the effective rank of the matrix) "var_pcs" - The proportion of variance explained by each principle comoponent
1 | sparse_pca(mtx, n_pcs=10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.