View source: R/cell-workflow.R
| cuda_cell_neighbors | R Documentation |
Construct a nearest-neighbour representation
cuda_cell_neighbors(
embedding,
k = 15L,
metric = c("euclidean", "cosine"),
device = c("auto", "cuda", "cpu"),
batch_size = 256L
)
embedding |
Cell-by-component matrix or |
k |
Number of neighbours. |
metric |
Distance metric. |
device |
Computation device. |
batch_size |
Maximum query rows per exact kNN distance block. Smaller values reduce peak distance memory. |
A cuda_knn object retaining cell names from the embedding.
cuda_cell_neighbors(
matrix(rnorm(60), 20, 3),
k = 5,
batch_size = 4,
device = "cpu"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.