AnnoyNN: Run annoy Ref: Seurat

View source: R/knn.R

AnnoyNNR Documentation

Run annoy Ref: Seurat

Description

Run annoy Ref: Seurat

Usage

AnnoyNN(
  data,
  query = data,
  metric = "euclidean",
  n.trees = 50,
  k,
  search.k = -1,
  include.distance = TRUE,
  index = NULL
)

Arguments

data

Data to build the index with

query

A set of data to be queried against data

metric

Distance metric; can be one of "euclidean", "cosine", "manhattan", "hamming"

n.trees

More trees gives higher precision when querying

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

index

optional index object, will be recomputed if not provided

Value

list(nn.idx, nn.dists)


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