
Generates the kNN graph with additional distances
rs_sc_knn_w_dist.RdArguments
- embd
Numerical matrix. The embedding matrix to use to generate the kNN graph.
- knn_params
List. The kNN parameters defined by
params_sc_neighbours().- validate_index
Boolean. If you want to validate the index via an exhaustive search in a subset of cells.
- verbose
Integer.
0L- quiet;1L- normal verbosity;2L- detailed verbosity.- seed
Integer. Seed for reproducibility purposes.
Value
A list with:
indices - An integer matrix (cells x k) representing the indices (0-indexed!) of the approximate nearest neighbours.
dist - A numerical matrix (cells x k) representing the distances to the nearest neighbours.
dist_metric - String representing the used distance metric.
Rows the search left short are padded by repeating their last neighbour and distance.