Description Usage Arguments Value Author(s)
returns the k nearest neighbors to x in the data.
1 | knneighbor(x, k, data, defined, distance)
|
x |
a row vector, who's k nearest neighbors in the data are sought. |
k |
An integer, giving the number of nearest neighbors to x, that are sought. |
data |
A matrix, containing the data as row vectors. |
defined |
A row vector of the same length as x, containing 1 for all columns of the data that are used for the calculation. If defined is missing, all columns are used. |
distance |
the distance measure that is used, e.g. euclidean, minkovsky... If none is given, euclidean is the default |
nNInd |
a vector, containing the indices of the k rows of data that are the k nearest neighbours of x. |
nNData |
A matrix, containing the k nearest neighbours of x as row vectors |
nNDists |
A vector containing the distances of x to the corresponding k nearest neighbours. |
Raphael Paebst
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.