Two-sided Median

Local Algorithm - One-Dimensional Algorithm

Two-sided Median algorithm computes the median

mkn=Median{Ynk,,Yn1,Yn+1,,Yn+k}.

Yn is the observed point and 2k is the size of the neighborhood window. If

|mknYn|τ,

Yn is treated as a value outside the region of interest.

Input Parameters

Parameter Type Constraint Description Remarks
Y YRN NN,N3 Input data vector of length N  
τ τR+   User-specified threshold  

Output Parameters

Parameter Type Constraint Description Remarks
ˆY ˆYRN   Values in the Y list which are outside the region of interest are marked  

Single Steps using the Algorithm

References

  • S. Basu, M. Meckesheimer, Automatic outlier detection for time series: an application to sensor data, Knowledge and Information Systems, vol. 11, Issue 2, pp 137-154, 2007.