lofactor: Local Outlier Factor

Description Usage Arguments Details Value Author(s) References Examples

View source: R/lofactor.R

Description

A function that finds the local outlier factor (Breunig et al.,2000) of the matrix "data" using k neighbors. The local outlier factor (LOF) is a measure of outlyingness that is calculated for each observation. The user decides whether or not an observation will be considered an outlier based on this measure. The LOF takes into consideration the density of the neighborhood around the observation to determine its outlyingness.

Usage

1

Arguments

data

The data set to be explored

k

The kth-distance to be used to calculate the LOF's.

Details

The LOFs are calculated over a range of values, and the max local outlier factor is determined over this range.

Value

lof

A vector with the local outlier factor of each observation

Author(s)

Caroline Rodriguez

References

Breuning, M., Kriegel, H., Ng, R.T, and Sander. J. (2000). LOF: Identifying density-based local outliers. In Proceedings of the ACM SIGMOD International Conference on Management of Data.

Examples

1
2
3
#---- Detecting the top 10 outliers using the LOF algorithm----
data(bupa)
bupa.lof=lofactor(bupa,10)

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

dprep documentation built on May 29, 2017, 11:01 a.m.