Description Usage Arguments Examples
View source: R/get_anomalies.R
Based on a summary normalized/stacked metric, retrieve top anomalies.
1 2 | get_anomalies(x, rank.prop = 0.05, nmin = 10, nmax = 300,
stack.use = "avg", method.use = "norm", verbose = TRUE, ...)
|
x |
stranger object (before of after singularize) |
rank.prop |
proportion of records to be considered as anomalies |
nmin |
constraint - minimum number of anomalies |
nmax |
constrait - maximum number of anomalies |
stack.use |
One of c("max","avg","min","damavg", "pruavg")) - must have been requestedwhen invoking 'singularize' (done by default). |
method.use |
One of c("norm","rank") - must have been requestedwhen invoking 'singularize' (done by default). |
verbose |
logical: provide some information. |
... |
additional parameters to pass to singularize (if called on a non-singularized object) Anomalies selection is performed using one summary metric. This summary metrics is assumed to stacked some base metrics - may be only one!. Stacking is performed after standardisation, being possible with two approaches: normalisation ( Three parameters are used together to define anomalies: rank.prop is firsu used to filter on top x% anomalies then one applies on top of this criteria conditions on a minimal ( |
1 2 3 4 5 6 7 8 9 10 11 12 | data <- crazyfy(iris[,1:4])
(anom <- get_anomalies(strange(data)))
## Not run:
library(dplyr)
ss <- iris %>% select(-Species) %>%
crazyfy() %>%
strange(weird="autoencode") %>%
singularize(methods="norm",stacks="avg")
anom2 <- ss %>% get_anomalies(nmin=2, nmax=4)
ss %>% plot(type="n",score="N_anom_norm_avg",anomaly_id=anom2[1])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.