Introductie tot anomaliedetectie in R
Alastair Rushworth
Data Scientist
Globale versus lokale anomalieën

LOF berekenen voor de meubeldata
library(dbscan)
furniture_lof <- lof(scale(furniture), k = 5)
Bekijk de scores
furniture_lof[1:10]
[1] 1.0649669 1.1071205 0.9980290 1.0392385 0.9725305
[6] 1.1933199 1.3210459 1.1409659 1.0613144 1.0805445
LOF is een verhouding van dichtheden
Hoge LOF-waarden duiden op meer geïsoleerde punten
furniture$score_lof <- furniture_lofplot(Width ~ Height, data = furniture, cex = score_lof, pch = 20)

Introductie tot anomaliedetectie in R