AnnoyParam: The AnnoyParam class

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/Annoy-class.R

Description

A class to hold parameters for the Annoy algorithm for approximate nearest neighbor identification.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
AnnoyParam(ntrees=50, directory=tempdir(), search.mult=ntrees, distance="Euclidean")

AnnoyParam_ntrees(x)

AnnoyParam_directory(x)

AnnoyParam_search_mult(x)

## S4 method for signature 'AnnoyParam'
show(object)

Arguments

ntrees

Integer scalar, number of trees to use for index generation.

directory

String, the directory in which to save the index.

search.mult

Numeric scalar, multiplier for the number of points to search.

distance

String, the distance metric to use.

x, object

A AnnoyParam object.

Details

The AnnoyParam class holds any parameters associated with running the Annoy algorithm. This generally relates to building of the index - see buildAnnoy for details.

Value

The AnnoyParam constructor will return an instance of the AnnoyParam class.

AnnoyParam_ntrees will return the number of trees as an integer scalar.

AnnoyParam_directory will return the directory as a string.

AnnoyParam_search_mult will return the multiplier for the number of points to search.

Author(s)

Aaron Lun

See Also

buildAnnoy

Examples

1
2
3
4

BiocNeighbors documentation built on Dec. 9, 2020, 2:01 a.m.