Hampel filter implementation that works on numpy arrays, implemented with numba.
Parameters
Name
Type
Description
Default
window_size
The window range is from [(i - window_size):(i + window_size)], so window_size is half of the window, counted in number of array elements (as opposed to specify a time span, which is not supported by this implementation)
5
threshold
The threshold for marking an outlier. A low threshold “narrows” the band within which values are deemed as outliers. n_sigmas, default=3.0