powered by
A helper function that wraps around quantile to apply a threshold to anomaly scores.
quantile
anomaly_thresh(x, threshold = 0.99, ...)
Logical vector referencing which, if any, of the provided values are outliers.
Numeric vector of anomaly scores (e.g. created by anomaly_score).
anomaly_score
Numeric value to determine the threshold to flag outliers among the score.
Additional parameters passed to quantile.
test_data <- c(1,2,3,4,5,100,5,4,3,2,1) anomaly_thresh(test_data, 0.99)
Run the code above in your browser using DataLab