Learn R Programming

dprep (version 3.0.2)

maxlof: Detection of multivariate outliers using the LOF algorithm

Description

A function that detects multivariate outliers using the local outlier factor for a matrix over a range of neighbors called minpts.

Usage

maxlof(data, name = "", minptsl = 10, minptsu = 20)

Arguments

data
Dataset for outlier detection
name
Name of dataset used in the graph title.
minptsl
Lower bound for the number of neighbors
minptsu
Upper bound for the number of neighbors

Value

maxlofactor
A vector containing the index of each observation of the dataset and the corresponding local outlier factor.

Details

Calls on the function "lofactor" to compute the local outlier factor for each integer number of neighbors in the range [minptsl, minptsu]. Also displays a plot of the factors for each observation of the dataset. In the plot, the user should seek to identify observations with large gaps between outlyingness measures. These would be candidates for outliers.

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

Run this code
## Not run: #Detecting top 10 outliers in class number 1 of Breastw using the LOF algorithm
# data(breastw)
# breastw=ce.impute(breastw,"median",1:9)
# breastw1.lof=maxlof(breastw[breastw[,10]==1,],name="Breast-Wisconsin",30,40)
# breastw1.lof[order(breastw1.lof,decreasing=TRUE)][1:10]
# ## End(Not run)

Run the code above in your browser using DataLab