anomaly_score {spectralAnomaly} | R Documentation |
Create anomaly score from input data
Description
Convert an input of numeric data, typically a time series, into a score for anomaly detection. The data is first extended to improve the detection latency, followed by saliency map creation. The score is calculated using the sliding window average for each point in the saliency map.
Usage
anomaly_score(x, score_window, spec_window = 3, m = 5)
Arguments
x |
Numeric vector. |
score_window |
Integer value for the window width for scoring. |
spec_window |
Positive integer value for the window to calculate the averaged log spectrum. |
m |
Integer value representing the number of preceding points for the estimation. |
Value
A numeric vector of anomaly scores.
Examples
tmp <- ts(rnorm(12*6,10,2), start=c(2009, 1), end=c(2014, 12), frequency=12)
anomaly_score(tmp, score_window = 25)
[Package spectralAnomaly version 0.1.1 Index]