Hello, I am looking for a moving window mean accumulator. Could roll my own, but I know there's a pretty good one in Boost. Need to know, does it comprehend the notion of Expiration? That is, values dropping off after a predetermined window of time? Preferably depending on the boost::chrono::high_resolution_clock. Thank ye... Regards, Michael Powell
On Sat, Sep 7, 2013 at 9:35 PM, Michael Powell <mwpowellhtx@gmail.com> wrote:
Hello,
I am looking for a moving window mean accumulator. Could roll my own, but I know there's a pretty good one in Boost. Need to know, does it comprehend the notion of Expiration? That is, values dropping off after a predetermined window of time? Preferably depending on the boost::chrono::high_resolution_clock.
Digging into the domain a bit further, perhaps Expiry is unnnecessary. What I really want, I think, is a rolling weighted mean. So to do that, something like the following: #include <boost/accumulators/accumulators.hpp> #include <boost/accumulators/statistics/rolling_mean.hpp> #include <boost/accumulators/statistics/weighted_mean.hpp> //For convenience: namespace boost { namespace accumulators { typedef accumulator_set<float, stats<tag::rolling_mean>, features<stag:weighted_mean> > acc_type; }} //namespace boost::accumulators Which should allow me to query the accumulator for rolling_mean over the last however many samples?
Thank ye...
Regards,
Michael Powell
participants (1)
-
Michael Powell