Computes the dot product between the subcentroids from the indexed reference and the subvectors of an element of the query dataset. Returns an M by k matrix. Used as an intermediate step (in NNfirst and NNmult) for calculating an approximation of the cosine similarity between the query and the reference.
1 | subdistsmult(subcentroids, query_chunks, M, k, cellnum)
|
subcentroids |
A list of matrices containing the subcentroids of each chunk. |
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 |
k |
An integer specifying the number of subcentroids per chunk |
cellnum |
An integer specifying the column of the query dataset we wish to consider |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.