Firionus / FastRunningMedian.jl

Efficient running median for Julia
MIT License
11 stars 1 forks source link

nice work, may I use it #24

Open JeffreySarnoff opened 1 year ago

JeffreySarnoff commented 1 year ago

I would like to replace my default rolling median (which is rolling(VectorizedStatistics.vmedian, ..)) with a call to yours that may be post-adjusted to comport with my api.

Firionus commented 1 year ago

Hey Jeffrey, great to see you dropping by :blush:

And yes, you may use it. The code is MIT-licensed, so if you really want to copy it over or fork, just include the license from this repo and you are good to go. I've always envisioned that FastRunningMedian.jl would one day be part of a bigger package, it always felt a bit too small for me. However, I don't think the algorithm here is done yet. I still want to explore BTrees and better performance for small windows before I'll tag the 1.0. And such experimentation is certainly easier in a smaller, more contained package. Progress has been slow though, I only work on it occasionally when I find some time and motivation.

For the moment I would prefer if you could use FastRunningMedian as a dependency to RollingFunctions. Is there anyting I can do to ease that integration? running_median with tapering=:none should already be really close to rollmedian. I'd even consider adding an option tapering=:beginning_only or tapering=:start to give the same boundary conditions as runmedian. Would that help?

JeffreySarnoff commented 1 year ago

I am interested in using your work in version 1 of RollingWindows (whatever its name).

The API is different and more flexible see Introducing Windowed Functions

One feature yet to be implemented is to roll a function over a data vector where the window width may vary as the function rolls, the successive widths are given as an integer vector.

I am happy to take a look toward easy integration.

Firionus commented 1 year ago

That's cool! Some thoughts of mine: