View source: R/Nearest_Neighbors.R
Nearest_Neighbors | R Documentation |
Nearest_Neighbors function
Nearest_Neighbors(X, observation, K, method, p = NULL)
X |
n x m matrix |
observation |
1 x m vector which is a row of the matrix X |
K |
positive integer that is the number of nearest-neighbors |
method |
Which distance equation will be used to calculate the nearest-neighbors. |
p |
If supplied, the positive integer used in calculating the Minkowski distance |
A list with first item is the 1 x K vector of indices of the nearest-neighbors and the second item is the 1 x K vector of distances to the nearest-neighbors.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.