Home   >   User Resources   >   Online Help   >   apakNearestNeighbour.Smoother
 

 

Function index Version 3.0.0

apakNearestNeighbour.Smoother(k, DataMatrix)

Excel=apakNearestNeighbour.Smoother(k, DataMatrix)

Result

k-nearest neighbors (kNN) smoother: replaces each data point by the average of itself and its k nearest neighbors, feature by feature. Returns an r x c matrix.

Syntax

k: number of nearest neighbors to consider, between 1 and c - 1

DataMatrix: r x c data matrix

Remarks

Neighbors are ranked by Euclidean distance; ties are broken by the lower column index. A data point is never its own neighbor, even if other data points have the same coordinates.

Pressing Esc aborts the calculation; the function then returns "Calculation aborted by user."