precluster: Pre-cluster points with k-means

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

View source: R/precluster.R

Description

Perform k-means clustering in preparation for a nearest-neighbors search.

Usage

1

Arguments

X

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

...

Further arguments to pass to kmeans.

Details

This function is automatically called by findKNN and related functions. However, it can be called directly by the user to save time if multiple queries are to be performed to the same X.

Value

A list containing:

Author(s)

Aaron Lun

See Also

kmeans, findKNN, queryKNN, findNeighbors

Examples

1
2
3
Y <- matrix(rnorm(100000), ncol=20)
out <- precluster(Y)
str(out)

kmknn documentation built on Nov. 1, 2018, 4:21 a.m.