Compute euclidean nearest neighbor distances.

EuclideanDist(data, ka)

Arguments

data

An M x d matrix with M rows of data points and d columns of features.

ka

Number of nearest neighbors. See details from nn2.

Value

Returns the distance matrix.

Examples

{
dist.mat <- EuclideanDist(iris[,1:2], ka = 10)
}