Find outliers using kNN distance with maximum gap
use_KNN(data, alpha = 0.01, k = 10, knnsearchtype = c("kd_tree",
"brute"))
A vector, matrix, or data frame consisting of numeric and/or categorical variables.
Threshold for determining the cutoff for outliers. Observations are considered outliers outliers if they fall in the \((1- alpha)\) tail of the distribution of the nearest-neighbor distances between exemplars.
Number of neighbours considered.
A character vector indicating the search type for k- nearest-neighbors.
The indexes of the observations determined to be outliers and the outlying scores