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

find_nn_eps

Find nearest neighbours in epsilon environment.


Description

Finds the nearest points for every point in an environment with radius eps.

Usage

find_nn_eps(X, eps)

Arguments

X

matrix object containing the input data.

eps

size of epsilon environment around x_i.

Details

A good value for eps strongly depends on the scaling of the data. Therefore we recommend to use the R function scale.

Value

neighbours

matrix with N rows and columns. If distance between x_i and x_i is smaller than eps, neighbours[i,j] is one, else zero.

See Also

Examples

data( lle_scurve_data )
	X <- lle_scurve_data
	neighbours <- find_nn_eps( X, 0.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.