Good package to smooth outliers?

Hi all,
I’m looking for a package (or a good method) that can smooth out outliers like these:


Any suggestions?

You could take a look at FastRunningMedian.jl.


FastRunningMedian .jl code
using FastRunningMedian, Plots; gr(dpi=600)
x = range(3476, 3480, 30)
y = 1000 .+ 100*(x .- 3476) .+ 100*rand(30)
y[8:10] .= -100

yrm = running_median(y, 7)

plot(x, [y yrm], c=[:blues :blue], label=["Original" "FastRunningMedian"])
1 Like

Also more information is needed, as outliers are hard to define. Especially, as the saying goes, one man’s trash is another man’s treasure. Rafael’s suggestion looks nice though.