k-nearest neighbor denoising of a set of pointsSource:
Reduce noise in a high-dimensional dataset by averaging each point with its nearby neighbors.
A matrix of numeric data, or something that can be cast to a matrix. Each row represents a point.
Optional. A block for each row in X. A factor, or something that can be cast to a factor. Denoising will be performed independently within each block.
Number of nearest neighbors to find around each point (including itself).
Number of steps to take along the directed k-nearest neighbor graph.
steps=1uses the k-nearest neighbors,
steps=2uses the k-nearest neighbors and their k-nearest neighbors, etc.
knnDenoise first finds the
k-nearest neighbors to each point (including the point itself). Then, for each point, the average is found of the points reachable in
steps steps along the directed k-nearest neighbor graph.