anomalize_methods | R Documentation |
Methods that power anomalize()
iqr(x, alpha = 0.05, max_anoms = 0.2, verbose = FALSE)
gesd(x, alpha = 0.05, max_anoms = 0.2, verbose = FALSE)
x |
A vector of numeric data. |
alpha |
Controls the width of the "normal" range. Lower values are more conservative while higher values are less prone to incorrectly classifying "normal" observations. |
max_anoms |
The maximum percent of anomalies permitted to be identified. |
verbose |
A boolean. If |
Returns character vector or list depending on the value of verbose
.
The IQR method is used in forecast::tsoutliers()
The GESD method is used in Twitter's AnomalyDetection
package and is also available as a function in @raunakms's GESD method
anomalize()
set.seed(100)
x <- rnorm(100)
idx_outliers <- sample(100, size = 5)
x[idx_outliers] <- x[idx_outliers] + 10
iqr(x, alpha = 0.05, max_anoms = 0.2)
iqr(x, alpha = 0.05, max_anoms = 0.2, verbose = TRUE)
gesd(x, alpha = 0.05, max_anoms = 0.2)
gesd(x, alpha = 0.05, max_anoms = 0.2, verbose = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.