One-sided Median

Local Algorithm - One-Dimensional Algorithm

One-sided Median algorithm computes the median

mYn=Median{Yn2k,,Yn1}

and the median

mZn=Median{Zn2k,,Zn1}

with

Zn=YnYn1.

2k is the size of the neighborhood window. Defining

ˆmn=mYn+kmZn,

Yn is treated as a value outside the region of interest if |Ynˆmn|τ.

Input Parameters

Parameter Type Constraint Description Remarks
Y YRN NN Input data sequence 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.