Leave One Out Kernel Density Estimates for Outlier Detection

Outlier detection using leave-one-out kernel density estimates and extreme value theory. The bandwidth for kernel density estimates is computed using persistent homology, a technique in topological data analysis. Using peak-over-threshold method, a generalized Pareto distribution is fitted to the log of leave-one-out kde values to identify outliers.


lookout

R-CMD-check CRANstatus

lookout identifies outliers in data using leave-one-out kernel density estimates and extreme value theory. The bandwidth for kernel density estimates is computed using persistent homology, a technique in topological data analysis. Using the peak-over-threshold method, a Generalized Pareto Distribution is fitted to the log of leave-one-out kde values to identify outliers.

See Kandanaarachchi and Hyndman (2022) and Hyndman, Kandanaarachchi and Turner (2026) for the underlying methodology.

Installation

You can install the released version of lookout from CRAN with:

#install.packages("lookout")

And the development version from GitHub with:

# install.packages("pak")
pak::pak("sevvandi/lookout")

Example

library(lookout)
lo <- lookout(faithful)
lo
#> Leave-out-out KDE outliers using lookout algorithm
#> 
#> Call: lookout(X = faithful)
#> 
#>   Outliers Probability
#> 1        6 0.004890854
#> 2       24 0.005486819
#> 3       46 0.007788668
#> 4      149 0.006568032
#> 5      158 0.005579415
#> 6      197 0.004091079
#> 7      211 0.000000000
#> 8      244 0.002056726
autoplot(lo)

Next we look at outlier persistence. The outlier persistence plot shows the outliers that persist over a range of bandwidth values for different levels of significance. The strength is inversely proportional to the level of significance. If the level of significance is 0.01, then the strength is 10 and if it is 0.1, then the strength is 1.

persistence <- persisting_outliers(faithful)
autoplot(persistence)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("lookout")

2.0.2 by Sevvandi Kandanaarachchi, 2 months ago


https://sevvandi.github.io/lookout/, https://github.com/sevvandi/lookout


Report a bug at https://github.com/sevvandi/lookout/issues


Browse source code at https://github.com/cran/lookout


Authors: Sevvandi Kandanaarachchi [aut, cre] (ORCID: , Rob Hyndman [aut] , Chris Fraley [ctb]


Documentation:   PDF Manual  


GPL-3 license


Imports evd, ggplot2, mlpack, RANN, robustbase, stats, tidyr

Suggests knitr, rmarkdown, testthat


Imported by oddnet.


See at CRAN