Skip to contents

Rerank candidate neighbours exactly against a bigmemory::big.matrix

Usage

rerank_candidates_bigmatrix(
  x,
  query,
  candidate_index,
  metric = "euclidean",
  top_k = NULL,
  plan = NULL,
  block_size = knn_default_block_size(),
  exclude_self = is.null(query)
)

Arguments

x

A bigmemory::big.matrix or prepared reference with a stored descriptor.

query

Query source. Supply NULL to rerank self-query candidates.

candidate_index

Candidate neighbour indices supplied as a matrix, bigmemory::big.matrix, or kNN result object.

metric

Distance metric. Supported values are "euclidean", "sqeuclidean", and "cosine".

top_k

Number of reranked neighbours to return. Defaults to all supplied candidate columns.

plan

Optional execution plan returned by knn_plan_bigmatrix().

block_size

Number of query rows to process at a time.

exclude_self

Logical flag controlling whether self ids are removed when query = NULL.

Value

An object of class "bigknn_knn_result".