
Generate a GPU-accelerated kNN graph
rs_gpu_knn.Rd
Builds a kNN graph from an embedding matrix on the wgpu backend. Three
searches are available: an exact brute-force scan, an IVF index that probes
a subset of Voronoi cells, and a CAGRA-style NNDescent graph that is either
beam searched or handed back as the descent left it.
Euclidean distances come back as true L2, not squared.
Arguments
- embd
Numeric matrix of embeddings, cells x features.
- k
Integer. Number of neighbours to return, self excluded.
- knn_method
String. One of
c("nndescent", "exhaustive", "ivf").- nn_params
A named list with the parameters, see
params_nn_gpu()- seed
Integer. Random seed for reproducibility.
- verbose
Integer.
0L- quiet;1L- normal verbosity;2L- detailed verbosity.