DynamicThresholdScorer | R Documentation |
R6 class that implements the online anomaly scoring method (based on the prediction errors) proposed by Buda et al.
new()
Create a new DynamicThresholdScorer object.
DynamicThresholdScorer$new(wnMin = 100, wnMax = 2000, l = 10)
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.
A new DynamicThresholdScorer object.
computeScore()
Calculates the anomaly score from the prediction error.
DynamicThresholdScorer$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.
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
scorer <- DynamicThresholdScorer$new(3) 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.