use_KNN: Find outliers using kNN distance with maximum gap

View source: R/find_HDoutliers.R

use_KNNR Documentation

Find outliers using kNN distance with maximum gap

Description

Find outliers using kNN distance with maximum gap

Usage

use_KNN(data, alpha, k, knnsearchtype, p, tn)

Arguments

data

A vector, matrix, or data frame consisting of numeric and/or categorical variables.

alpha

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.

k

Number of neighbours considered.

knnsearchtype

A character vector indicating the search type for k- nearest-neighbors.

p

Proportion of possible candidates for outliers. This defines the starting point for the bottom up searching algorithm.

tn

Sample size to calculate an emperical threshold. Default is set to 50.

Value

The indexes of the observations determined to be outliers and the outlying scores.


pridiltal/stray documentation built on Nov. 24, 2023, 1:31 p.m.