pad.sw.median: Point anomaly detection using sliding window median

Description Usage Arguments Value References See Also

Description

a value $t_i$ is considered as an anomaly if abs(t_i - m_i) > threshold, where m_i is the median of the neighborhood of i defined with the following (where k = size):

two-sided

m_i = median(t_(i-k), ..., t_(i+k)), then t_i is inside

one-sided

m_i = median(t_(i-2k), ..., t_(i-1)), then t_i is outside

Usage

1
pad.sw.median(ts, side = "one-sided", size = 10, threshold = 1)

Arguments

ts

An univariate time series

side

Choose between one-sided or two-sided

size

Size of the sliding window

threshold

Value

Vector of estimated anomalies (indexes)

References

Basu S and Meckesheimer M (2007). “Automatic outlier detection for time series: an application to sensor data.” Knowledge and Information Systems, 11(2), pp. 137–154. ISSN 0219-1377, http://doi.org/10.1007/s10115-006-0026-6, http://dx.doi.org/10.1007/s10115-006-0026-6.

See Also

pad


fxjollois/pad documentation built on May 16, 2019, 4:06 p.m.