| .ggmlr_pca_gpu | R Documentation |
Computes principal components of a feature-by-cell matrix. The heavy step —
the gene-by-gene covariance (a large matrix multiply) — runs on the Vulkan
GPU via the ag_* backend; the eigendecomposition of the (small,
features x features) covariance runs on the CPU, since ggml has no
eigensolver. Cells are projected onto the leading eigenvectors.
.ggmlr_pca_gpu(
mat,
n_components = 50L,
center = TRUE,
backend = c("vulkan", "cpu"),
chunk_size = NULL
)
mat |
Dense numeric matrix, features in rows, cells in columns. |
n_components |
Number of principal components to return. |
center |
Logical; subtract the per-feature mean before PCA (default
|
backend |
|
A ggml_result: embedding is cells x
n_components; metadata holds stdev (component standard
deviations), loadings (features x components) and backend.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.