Learn R Programming

lle (version 1.1)

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$.

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.

Details

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

See Also

find_nn_k

Examples

Run this code
	data( lle_scurve_data )
	X <- lle_scurve_data
	neighbours <- find_nn_eps( X, 0.5 )
	table( rowSums(neighbours) )

Run the code above in your browser using DataLab