glidertools.cleaning.outlier_bounds_iqr¶
-
glidertools.cleaning.
outlier_bounds_iqr
(arr, multiplier=1.5)¶ Mask values outside the upper/lower outlier limits by interquartile range:
\[\begin{split}lim_{low} = Q_1 - 1.5\cdot(Q_3 - Q_1)\\ lim_{up} = Q_3 + 1.5\cdot(Q_3 - Q_1)\end{split}\]the multiplier [1.5] can be adjusted by the user returns the lower_limit, upper_limit
Parameters: - arr (np.array|xr.DataArray, dtype=float, shape=[n, ]) – the full timeseries of the entire dataset
- multiplier (float=1.5) – sets the interquartile range
Returns: arr – A data object where values outside the limits are masked. Metdata will be preserved if the original input array is xr.DataArray
Return type: array | xarray.DataArray