AnnoySearch: Search an Annoy approximate nearest neighbor index

View source: R/knn.R

AnnoySearchR Documentation

Search an Annoy approximate nearest neighbor index

Description

Search an Annoy approximate nearest neighbor index

Usage

AnnoySearch(index, query, k, search.k = -1, include.distance = TRUE)

Arguments

query

A set of data to be queried against the index

k

Number of neighbors

search.k

During the query it will inspect up to search_k nodes which gives you a run-time tradeoff between better accuracy and speed.

include.distance

Include the corresponding distances in the result

Annoy

index, built with AnnoyBuildIndex

Value

A list with 'nn.idx' (for each element in 'query', the index of the nearest k elements in the index) and 'nn.dists' (the distances of the nearest k elements)


beyondpie/pureRUtils documentation built on Jan. 10, 2023, 3:22 a.m.