NN: Main nearest neighbour calculation function. Used on the...

Description Usage Arguments

View source: R/RcppExports.R

Description

Main nearest neighbour calculation function. Used on the first reference dataset. Returns a list of three objects: 1) the cell indices of the w nearest neighbours 2) the corresponding approx. cosine similarities

Usage

1
NN(w, k, subcentroids, subclusters, query_chunks, M, SqNorm)

Arguments

w

An integer specifying the number of nearest neighbours

k

An integer specifying the number of subcentroids for each product quantization chunk

subcentroids

A list of matrices containing the subcentroids of each chunk.

subclusters

A matrix containing the subcentroid assignments of each reference cell. See scf_index.

query_chunks

A list of matrices containing the chunks of the query dataset after it has been split according to the product quantization method

M

An integer specifying the number of chunks

SqNorm

A numerical vector containing the Euclidean Squared Norm of each query cell.


hemberg-lab/scmap documentation built on Nov. 29, 2020, 1:06 p.m.