Description Usage Arguments Value Examples

This function performs feature-bagging based outlier detection algorithm The implemented method is based on the work of "Lazarevic, A., Kumar, V., Feature bagging for outlier detection, 2005" This method can be regarded as an ensemble method, which based on the results of local outlier factor (LOF). During each iteration, a random subset of variables, whose size is randomly chosen between d/2 to d (where d is the dimensionality of the input data), is selected. The LOF method is applied to calculate the LOF scores based on the selected data subset. The final score of FBOD is the cumulative sum of each iteration.

1 |

`data` |
is the data frame containing the observations. Each row represents an observation and each variable is stored in one column. |

`iter` |
is the iteration used. |

`k.nn` |
is the value used for calculating the LOF score |

The function returns a vector containing the FBOD outlier scores for each observation

1 2 3 4 5 6 7 8 | ```
library(ggplot2)
res.FBOD <- Func.FBOD(data = TestData[,1:2], iter=10, k.nn=5)
data.temp <- TestData[,1:2]
data.temp$Ind <- NA
data.temp[order(res.FBOD, decreasing = TRUE)[1:10],"Ind"] <- "Outlier"
data.temp[is.na(data.temp$Ind),"Ind"] <- "Inlier"
data.temp$Ind <- factor(data.temp$Ind)
ggplot(data = data.temp) + geom_point(aes(x = x, y = y, color=Ind, shape=Ind))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.