Opened 11 years ago
Last modified 8 years ago
#6128 new Bugs
rolling_variance addition
Reported by: | Owned by: | Eric Niebler | |
---|---|---|---|
Milestone: | To Be Determined | Component: | accumulator |
Version: | Boost 1.47.0 | Severity: | Not Applicable |
Keywords: | Cc: |
Description
LS,
I have just finished writing an implementation and test of a rolling_variance which I would be happy to contribute to the framework.
It includes a redone version of rolling_mean which avoids potential overflow and accuracy issues. The rolling_variance currently returns zero when there are less than 2 samples available.
I'd be happy to do assist to make this fit the accumulator framework better and I include a first draft of the code. Nothing spectacular, but I have not seen the 'rolling' version being published anywhere in the exact form needed, making this non-trivial to implement anyway.
- Pieter
Attachments (4)
Change History (9)
by , 11 years ago
Attachment: | RollingMean.hpp added |
---|
by , 11 years ago
Attachment: | RollingVariance.hpp added |
---|
by , 11 years ago
Attachment: | UnitTestsAccumulators.cpp added |
---|
by , 11 years ago
Attachment: | UnitTestsAccumulators.2.cpp added |
---|
comment:1 by , 10 years ago
in the constructor and in operator(), "args" is not used and sometimes, this generates warnings. One simple solution is to add a void statement like this (the famous UNUSED(x) macro):
(void) args;
in the unit test, it's ok without it but not in more complex code.
comment:2 by , 9 years ago
Is there any update on this? It would be useful to have rolling variance in Boost Accumulators.
comment:4 by , 8 years ago
Replying to anonymous:
I agree with anonymous.
Are there any news about the addition of rolling_variance?
comment:5 by , 8 years ago
It has already been merged to the develop branch. I'm dealing with some test failure. Then I'll merge to release.
Correct version with all the decimails reported...