DynamicSigmaScorer: Dynamic Sigma Scorer

DynamicSigmaScorerR Documentation

Dynamic Sigma Scorer

Description

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.

Methods

Public methods


Method new()

Create a new DynamicSigmaScorer object.

Usage
DynamicSigmaScorer$new(l = 3, computeLogLikelihood = F)
Arguments
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.

Returns

A new DynamicSigmaScorer object.


Method computeScore()

Calculates the anomaly score from the prediction error.

Usage
DynamicSigmaScorer$computeScore(x, ...)
Arguments
x

Current error value to be scored.

...

Any other parameter.

Returns

Anomaly score, a value between [0,1]. The closer the number is to 1, the higher the chance it is an anomaly.

Examples


scorer <- DynamicSigmaScorer$new()

scorer$computeScore(0.5)
scorer$computeScore(0.6)
scorer$computeScore(0.5)
scorer$computeScore(7)
scorer$computeScore(0.2)


alaineiturria/otsad documentation built on Jan. 12, 2023, 12:26 p.m.