Open JeffreySarnoff opened 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?
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.
That's cool! Some thoughts of mine:
running_median
and tapering=:none
roll!
currently errors when you haven't grown the windows to its declared maximum size, which is a problem for varying window sizes. You can use shrink!
followed by grow!
, though, where the performance should only be lower by a constant factor. I've opened an issue on this (#25), since there is no inherent reason for the current behavior. median
yields a Float64 with even window size, but the element data type with odd window size, which is usually converted to Float64 since that is what the output is allocated as (https://github.com/Firionus/FastRunningMedian.jl/blob/93402ad4300d9fd4af4f16c1f68d254676d3e925/src/FastRunningMedian.jl#L81). EDIT: The output eltype is now customizable :heavy_check_mark: missing
. At least NaNs in float inputs are finally supported. (see #22)
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.