#title Outlier Detection [[TableOfContents]] ==== LOF (Local Outlier Factor) ==== {{{ library(DMwR) x <- df1$dau y <- df1$used_cash outlier.scores.y <- lofactor(y, k=5) outlier.scores.x <- lofactor(x, k=5) #plot(density(outlier.scores)) tmp <- data.frame(x, y, outlier.scores.y, outlier.scores.x) tmp <- tmp[tmp$outlier.scores.x <= 2 & tmp$outlier.scores.y <= 2, ] x <- tmp$x y <- tmp$y }}} ==== 참고자료 ==== * http://www.rdatamining.com/examples/outlier-detection * [https://www.r-bloggers.com/outlier-detection-and-treatment-with-r/ Outlier detection and treatment with R] * [https://www.r-bloggers.com/outliers-detection-and-intervention-analysis/ Outliers Detection and Intervention Analysis]