Generate a CAGRA-style GPU-accelerated kNN graph
rs_cagra_gpu_knn.RdBuilds a kNN graph from an embedding matrix using the CAGRA algorithm on the wgpu backend. Supports two retrieval modes: direct extraction from the NNDescent graph, or beam search over the pruned CAGRA graph. The former tends to have worse Recall.
Arguments
- embd
Numeric matrix of embeddings, cells x features.
- cagra_params
A named list with the parameters, see
params_sc_cagra()- extract_knn
Logical. If
TRUE, extracts the kNN graph directly from the NNDescent result (faster, slightly lower precision). IfFALSE, runs beam search over the pruned CAGRA graph (slower, higher precision).- seed
Integer. Random seed for reproducibility.
- verbose
Logical. Whether to print progress messages.