[ANN] HampelOutliers.jl

I’ve written an implementation of the Hampel filter, which is a simple yet robust way to detect and replace outliers in univariate time series without smoothing legitimate jumps. It seems to offer more flexibility than any other Julia or Python implementation I can find. But IANAS, and I make no grand claims.

For now, it’s not in the registry. Install it by direct reference, e.g.,

import Pkg; Pkg.add(url="https://github.com/tobydriscoll/HampelOutliers.jl")

Enjoy!

22 Likes

Can you share more about this? I want to learn how it work and on whch principle.

I think this is the original paper reference:

Hampel, F. R. (1971). A general qualitative definition of robustness. Annals of Mathematics Statistics, 42, 1887–1896.

The page linked in the announcement takes you to the GitHub readme file, which gives the mathematical definition. In essence, it applies median filtering within a moving window, but it makes replacement only when the original value deviates a certain amount from the window median.

Thanks for your kind help!