DynamicSigmaScorer | R Documentation |
R6 class that allows computing the anomaly score online based on the prediction errors and 3-sigma control limits. The mean and standard deviations for 3-sima control limits are dynamically computed whenever new data arrives.
new()
Create a new DynamicSigmaScorer object.
DynamicSigmaScorer$new(l = 3, computeLogLikelihood = F)
l
Number of deviations from the mean.
computeLogLikelihood
If TRUE
compute a log scale representation of the
likelihood value. Since thelikelihood computations return low probabilities that often go
into four 9's or five 9's, a log value is more useful for visualization, thresholding, etc.
A new DynamicSigmaScorer object.
computeScore()
Calculates the anomaly score from the prediction error.
DynamicSigmaScorer$computeScore(x, ...)
x
Current error value to be scored.
...
Any other parameter.
Anomaly score, a value between [0,1]. The closer the number is to 1, the higher the chance it is an anomaly.
scorer <- DynamicSigmaScorer$new() scorer$computeScore(0.5) scorer$computeScore(0.6) scorer$computeScore(0.5) scorer$computeScore(7) scorer$computeScore(0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.