lof | R Documentation |
Local Outlier Factor algorithm to detect outliers
lof(inputData, K, threshold, tutorialMode)
inputData |
Input Data (must be a data.frame) |
K |
This number represents the nearest neighbor to use to calculate the density of each point. This value is chosen arbitrarily and is responsibility of the data scientist/user to select a number adequate to the dataset. |
threshold |
Value that is used to classify the points comparing it to the calculated ARDs of the points in the dataset. If the ARD is smaller, the point is classified as an outliers. If not, the point is classified as a normal point (inlier) |
tutorialMode |
if TRUE the tutorial mode is activated (the algorithm will include an explanation detailing the theory behind the outlier detection algorithm and a step by step explanation of how is the data processed to obtain the outliers following the theory mentioned earlier) |
None, does not return any value
Andres Missiego Manjon
inputData = t(matrix(c(3,2,3.5,12,4.7,4.1,5.2,
4.9,7.1,6.1,6.2,5.2,14,5.3),2,7,dimnames=list(c("r","d"))));
inputData = data.frame(inputData);
lof(inputData,3,0.5,FALSE) #Can be changed to TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.