Description Usage Arguments Value Examples
This function performs the k-Nearest Neighbour algorithm without class estimation, but only computation of distances and neighbours.
1 | selfKNN(train, K = 1)
|
train |
numeric matrix or data frame. |
K |
number of neighbours considered. |
The function returns a list with the following components:
D |
matrix of squared root of the distances between observations and their nearest neighbours. |
idx |
Index of K nearest neighbours of each observation. |
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.