powered by
Get a list of neighborhoods, each containing the k nearest neighbors (not including itself) to a point in the data set.
k
neighborhoods(data, k, indices, eps=0.0)
A data set.
The number of neighbors in each neighborhood.
A vector with indices of the points in data that should be used as center for neighborhoods.
data
If non-zero, the relative error in distance allowed when finding nearest neighbors. See Details.
A list of neighborhoods where each item corresponds to one index in indices and each item contains a data set with k data points.
indices
The ann function of the package yaImpute is used for finding the k nearest neighbors. The eps parameter to neighborhoods is used in the ann function.
ann
yaImpute
eps
neighborhoods
# NOT RUN { data <- swissRoll3Sph(300, 300) neighborhoods(data, 10, 1:10) # }
Run the code above in your browser using DataLab