| .ggmlr_umap_gpu | R Documentation |
Lays a feature-by-cell matrix out in 2-D with UMAP. The kNN graph uses the
FNN kd-tree when available (exact, O(n log n), light on memory); without FNN
it falls back to a full distance matrix, computed on the GPU via the
pairwise_dist.comp shader (honest f32, sidestepping mul_mat's f16 path)
or on the CPU. The SGD layout optimisation runs on the GPU via
umap_sgd.comp under backend = "vulkan" (the default), falling
back to its exact CPU reference when the GPU is unavailable. The fuzzy
simplicial set in between stays on the CPU (sparse). backend_dist in
the metadata reports the kNN path actually taken ("fnn",
"vulkan", or "cpu").
.ggmlr_umap_gpu(
mat,
n_components = 2L,
n_neighbors = 15L,
min_dist = 0.1,
spread = 1,
n_epochs = 200L,
gpu_neighbor_max_cells = NULL,
backend = c("vulkan", "cpu"),
sgd_backend = c("cpu", "vulkan"),
knn_backend = c("cpu", "vulkan")
)
mat |
Dense numeric matrix, features x cells. |
n_components |
Output dimensionality (UMAP is virtually always 2). |
n_neighbors |
kNN graph size (default 15). |
min_dist |
Minimum spacing of points in the embedding (default 0.1). |
spread |
Scale of the embedding (default 1). |
n_epochs |
SGD epochs (default 200). |
gpu_neighbor_max_cells |
Cell ceiling for the GPU distance shader.
|
backend |
|
sgd_backend |
Which backend runs the SGD layout phase: |
A ggml_result whose embedding is cells x
n_components. metadata records the a/b curve parameters and the
per-phase backend (backend_dist, backend_sgd); the summary
backend is "vulkan" only when both phases ran on the GPU.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.