knneigh.vect {DMwR2} | R Documentation |
An auxiliary function of lofactor()
Description
Function that returns the distance from a vector x
to its
k-nearest-neighbors in the matrix data
Usage
knneigh.vect(x, data, k)
Arguments
x |
An observation. |
data |
A data set that will be internally coerced into a matrix. |
k |
The number of neighbours. |
Details
This function is strongly based on the code provided by Acuna
et. al. (2009) for the previously available dprep
package.
Value
A vector.
Author(s)
Luis Torgo ltorgo@dcc.fc.up.pt
References
Torgo, L. (2016) Data Mining using R: learning with case studies, second edition, Chapman & Hall/CRC (ISBN-13: 978-1482234893).
See Also
[Package DMwR2 version 0.0.2 Index]