DynamicThresholdScorer: Dynamic Threshold Scorer

DynamicThresholdScorerR Documentation

Dynamic Threshold Scorer

Description

R6 class that implements the online anomaly scoring method (based on the prediction errors) proposed by Buda et al.

Methods

Public methods


Method new()

Create a new DynamicThresholdScorer object.

Usage
DynamicThresholdScorer$new(wnMin = 100, wnMax = 2000, l = 10)
Arguments
wnMin

Minimum window size to start computing the anomaly score. It must be an integer between [1, wnMax].

wnMax

Maximum window size to compute the anomaly score. It must be an integer equal or bigger than wnMin.

l

Times standard deviation. It must be an integer greater than 0. By default 10, but other common values could be 3 and 6.

Returns

A new DynamicThresholdScorer object.


Method computeScore()

Calculates the anomaly score from the prediction error.

Usage
DynamicThresholdScorer$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.

References

T. S. Buda, B. Caglayan, H. Assem, DeepAD: A generic frameworkbased on deep learning for time series anomaly detection, in: LectureNotes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 10937LNAI, Springer Verlag, 2018, pp. 577-588

Examples


scorer <- DynamicThresholdScorer$new(3)

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.