Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

find_nn_k

Find k nearest neighbours.


Description

Finds the nearest k points for every point of the input data.

Usage

find_nn_k(X, k, iLLE = FALSE)

Arguments

X

matrix object containing the input data.

k

number of neighbours.

iLLE

a logical values indicating wheater to use improved LLE. See lle.

Value

neighbours

matrix with N rows and columns. If x_j is a neighbour of x_i then neighbours[i,j] is one, else zero.

See Also

Examples

data( lle_scurve_data )
	X <- lle_scurve_data
	neighbours <- find_nn_k( X, 5 )
	table( rowSums( neighbours ) )

lle

Locally linear embedding

v1.1
GPL-3
Authors
Holger Diedrich, Dr. Markus Abel (Department of Physics, University Potsdam)
Initial release
2012-03-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.