| .ggmlr_scale_gpu | R Documentation |
Per-gene centering and scaling to unit variance, matching Seurat's
ScaleData: (x - rowMeans) / rowSds, then clamp to
[-Inf, max_value] (Seurat clips at +10 by default). The dominant cost
— elementwise subtract/divide/clamp over the full dense matrix — runs on the
GPU; the per-gene mean and sd are cheap row reductions.
.ggmlr_scale_gpu(
mat,
max_value = 10,
backend = c("vulkan", "cpu"),
scale_backend = c("cpu", "vulkan"),
chunk_size = NULL
)
mat |
Dense numeric matrix, features x cells (log-normalised data). |
max_value |
Upper clip after scaling (default 10; Seurat's default). |
backend |
|
scale_backend |
Which backend actually runs the z-score: |
A ggml_result whose embedding is the scaled
features x cells matrix; metadata$kind = "transform",
metadata$layer = "scale.data".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.