================ Two-sided Median ================ :doc:`/WorkProcessClassifiers/LocalAlgorithm/index` - :doc:`/WorkProcessClassifiers/OneDimensionalAlgorithm/index` *Two-sided Median* algorithm computes the median .. math:: m_n^k = \text{Median}\{Y_{n-k}, \ldots, Y_{n-1}, Y_{n+1}, \ldots, Y_{n+k} \}. :math:`Y_n` is the observed point and :math:`2k` is the size of the neighborhood window. If .. math:: |m_n^k - Y_n| \geq \tau \, \text{,} :math:`Y_n` is treated as a value outside the region of interest. .. rubric:: Input Parameters +------------------------+------------------------------------------------+--------------------------------------------------------+------------------------------------------------+---------+ | Parameter | Type | Constraint | Description | Remarks | +========================+================================================+========================================================+================================================+=========+ | :math:`Y` | :math:`Y \in \mathbb R^N` | :math:`N \in \mathbb{N}, N \geq 3` | Input data vector of length :math:`N` | | +------------------------+------------------------------------------------+--------------------------------------------------------+------------------------------------------------+---------+ | :math:`\tau` | :math:`\tau \in \mathbb R^+` | | User-specified threshold | | +------------------------+------------------------------------------------+--------------------------------------------------------+------------------------------------------------+---------+ .. rubric:: Output Parameters +----------------------------+----------------------------------------------------+------------+-------------------------------------------------------------------------------------------+---------+ | Parameter | Type | Constraint | Description | Remarks | +============================+====================================================+============+===========================================================================================+=========+ | :math:`\hat{Y}` | :math:`\hat{Y} \in \mathbb R^N` | | Values in the :math:`Y` list which are outside the region of interest are marked | | +----------------------------+----------------------------------------------------+------------+-------------------------------------------------------------------------------------------+---------+ .. rubric:: Single Steps using the Algorithm * :doc:`/DataPreprocessing/DataCleaning/OutlierDetection/OutlierDetectionWithTwoSidedMedian/index` .. rubric:: 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.