pingouin.madmedianrule

pingouin.madmedianrule(a)[source]

Outlier detection based on the MAD-median rule.

Parameters
aarray-like

Input array.

Returns
outliers: boolean (same shape as a)

Boolean array indicating whether each sample is an outlier (True) or not (False).

References

1

Hall, P., Welsh, A.H., 1985. Limit theorems for the median deviation. Ann. Inst. Stat. Math. 37, 27–36. https://doi.org/10.1007/BF02481078

Examples

>>> from pingouin import madmedianrule
>>> a = [-1.09, 1., 0.28, -1.51, -0.58, 6.61, -2.43, -0.43]
>>> madmedianrule(a)
array([False, False, False, False, False,  True, False, False])