buildIndex: Build a nearest-neighbor index

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

Description

Build indices for nearest-neighbor searching with different algorithms.

Usage

1
buildIndex(X, ..., BNPARAM)

Arguments

X

A numeric matrix where rows correspond to data points and columns correspond to variables (i.e., dimensions).

...

Further arguments to be passed to individual methods. This is guaranteed to include transposed.

BNPARAM

A BiocNeighborParam object specifying the type of index to be constructed. This defaults to a KmknnParam object if no argument is supplied.

Details

Supplying a KmknnParam object as BNPARAM will dispatch to buildKmknn.

Supplying a VptreeParam object as BNPARAM will dispatch to buildVptree.

Supplying an AnnoyParam object as BNPARAM will dispatch to buildAnnoy.

Supplying an HnswParam object as BNPARAM will dispatch to buildHnsw.

Value

A BiocNeighborIndex object containing indexing structures for the specified algorithm.

Author(s)

Aaron Lun

See Also

buildKmknn, buildVptree, buildAnnoy and buildHnsw for specific methods.

Examples

1
2
3
Y <- matrix(rnorm(100000), ncol=20)
(k.out <- buildIndex(Y))
(a.out <- buildIndex(Y, BNPARAM=AnnoyParam()))

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