Skip to contents

Using the provided numeric input, typically a time series, calculate the spectral residual and output the saliency map for use in anomaly detection.

Usage

saliency_map(x, window = 3)

Arguments

x

Numeric vector.

window

Positive integer value.

Value

Numeric vector representing the saliency map values.

See also

Examples

tmp <- ts(rnorm(12*6,10,2), start=c(2009, 1), end=c(2014, 12), frequency=12)
saliency_map(tmp)
#>  [1] 0.17820962 0.04998219 0.14734606 0.04195726 0.05419626 0.09025011
#>  [7] 0.04698366 0.06126748 0.28146914 0.08857082 0.06957702 0.09106998
#> [13] 0.14616518 0.21654390 0.42834538 0.05717600 0.05381479 0.07453537
#> [19] 0.08409618 0.07912545 0.12869038 0.01928659 0.01239211 0.24476501
#> [25] 0.10108000 0.14762770 0.18548278 0.05327635 0.05968798 0.07487918
#> [31] 0.13117531 0.06127194 0.21331859 0.06189903 0.01295846 0.03197067
#> [37] 0.05676031 0.16711633 0.03149594 0.22519413 0.04509035 0.10983407
#> [43] 0.09383526 0.32241963 0.01059297 0.28400202 0.01392448 0.07821234
#> [49] 0.28983532 0.01090048 0.13023639 0.03264660 0.01431210 0.05936900
#> [55] 0.10703167 0.04043028 0.08596642 0.06307660 0.16407794 0.16963808
#> [61] 0.04071086 0.17573814 0.09623672 0.09768271 0.13548949 0.02136751
#> [67] 0.14371377 0.02001547 0.06636280 0.19442864 0.25218126 0.06899638