HampelFilter¶
-
class
sktime.transformations.series.outlier_detection.
HampelFilter
(window_length, n_sigma=3, k=1.4826, return_bool=False)[source]¶ HampelFilter to detect outliers based on a sliding window. Correction of outliers is recommended by means of the sktime.Imputer, so both can be tuned separately.
- Parameters
window_length (int) – Lenght of the sliding window
n_sigma (int, optional) – Defines how strong a point must outly to be an “outlier”, by default 3
k (float, optional) – A constant scale factor which is dependent on the distribution, for Gaussian it is approximately 1.4826, by default 1.4826
return_bool (bool, optional) – If True, outliers are filled with True and non-outliers with False. Else, outliers are filled with np.nan.
References
Hampel F. R., “The influence curve and its role in robust estimation”, Journal of the American Statistical Association, 69, 382–393, 1974