34 questions
0
votes
0
answers
105
views
Get count of element with value grater than quantile using boost accumulators
I'm using boost accumulators to calculate quantile probability.
I have an accumulator_set acc, and I get the quantile using:
auto q = boost::accumulators::quantile( acc, boost::accumulators::...
1
vote
1
answer
239
views
How can I use boost accumulator quantile_probability inside a class member initialization?
Boost Accumulator has an unfortunate quirk in which the api interface behaves differently when used inside of a class.
I am trying to use Boost Accumulator quantile_probability inside of a class but I ...
1
vote
1
answer
140
views
how to create custom boost accumulator for financial ohlcv data
I've the following problem. I've a set of OHLCV (Open, High, Low, Close, Volume) data for a symbol, with the following structure:
struct OHLCV {
double Open{0.0};
double High{0.0};
double Low{0....
0
votes
1
answer
114
views
Reset Boost parameterized Accumulator
How can I reset an accumulator that was created using parameters? In other words, I want to clear out any and all values that were added to the accumulator. Here is an example of an accumulator that ...
1
vote
2
answers
269
views
Is there a limit on the number of values added to a boost::accumulator?
Is there a limit on how many values that can be added to a boost::accumulator? If a large number of entries were added, is there any point in which the accumulator would cease to work properly or is ...
1
vote
1
answer
89
views
Do boost accumulators support the calculation of minimum difference between adjacent values?
Assumption here is that I am receiving many values and I do not want to store them in the vector.
So I would like to use something like boost accumulators. But in docs I can not find something like ...
1
vote
1
answer
944
views
How to initialize a boost rolling window accumulator?
I would like to initialize a boost rolling window accumulator without having to do an assignment inside a function call.
This is what I see everyone do:
boost::accumulators::accumulator_set<double, ...
2
votes
0
answers
287
views
Sliding window median in C++
I need some sliding window statistics and I am considering to use boost::accumulators for that, however, I couldn't find the sliding window median algorithm there.
Does boost::accumulators provide an ...
2
votes
2
answers
240
views
Why do the accumulators from the C++ boost library have a function-like interface?
In the boost library, we use accumulators like this:
acc(1); // push things into acc
cout << max( acc ) << endl; // get its result
Why can't we define its interface like this:
acc.push(1);...
2
votes
1
answer
76
views
What is the advantage of droppable accumulator in boost library in c++?
I've recently read the User's Guide of Boost.Accumulator There is a chapter named "Droppable Accumulators" which illustrates how to use "accumulators that can be removed from the accumulator_set<&...
1
vote
0
answers
103
views
How to set rounding policy to an empirical distribution accumulator in the quantile function?
I'm trying to change the default rounding parameter value integer_round_outwards to integer_round_inwards for an accumulator which contains an empirical discrete distribution (Discrete Quantile ...
2
votes
2
answers
1k
views
reset boost accumulator c++
Having not found a 'boost' way of resetting an accumulator in C++, I came across a piece of code that seems to reset a boost accumulator. But don't understand how it is achieving it. The code is as ...
1
vote
1
answer
253
views
boost accumulators library - how to find "Mode" and "r-squared"?
I have vector of doubles and need to find "mode" and "r-squared" values using boost library. I can find mean, min/max, count, variance using boost::accumulators but can't find anything for "mode" or "...
1
vote
1
answer
178
views
boost accumulator_set: expect primary expression
I am a new to Boost library. I want a program that could compute the min, max, mean and variance of a distance vector (of type std::vector < double >) and I wrote the following code
std::vector ...
0
votes
1
answer
2k
views
Boost::accumulator's percentile giving wrong values
I am using boost::accumulators::tag::extended_p_square_quantile for calculating percentile. In this, I also need to feed probabilities to the accumulator so I did this m_acc = AccumulatorType(boost::...
1
vote
1
answer
420
views
boost accumulators example doesn't compile
I installed boost (1.60.0) on Linux Mint 17.3 Rosa and tried to compile the boost accumulator example (http://www.boost.org/doc/libs/1_60_0/doc/html/accumulators/user_s_guide.html) with the gcc ...
0
votes
1
answer
237
views
Initialize a boost::accumulator_set at runtime
Is there a way to declare at runtime a boost::accumulator_set with features determined as runtime?
Something like:
accumulator_set *acc;
if (SomeUserInput1)
{
acc = new accumulator_set< double, ...
6
votes
1
answer
3k
views
boost::accumulators::rolling_mean returning incorrect mean value
Environment: VS 2013, Boost 1.58
I've written something that presents a more friendly interface to Boost's accumulator, which can be used to project a sum over a window, and calculate the actual ...
0
votes
2
answers
276
views
Boost::accumulators initialization failing on mac OSX Yosemite
I am currently trying to use Boost::accumulators, but getting compilation error while initializing in the constructor. Please check the class details below.
Environment:
Mac OSX Yosemite
G++ version: ...
3
votes
1
answer
559
views
Using empty boost::accumulators
How to check an empty boost::accumulators acc or not?
For example:
if (acc.isEmpty())//I don't know what function here
return 0;
else
return boost::accumulators::mean(acc).
Because if it's ...
3
votes
0
answers
693
views
boost::accumulator: std::vector does not work with rolling_mean
I'm following some thread (this, this and this) in order to calculate the rolling mean using std::vector as sample.
I've included headers of numeric::functional sublibrary in order to work with ...
1
vote
1
answer
305
views
boost::accumulator: which operators for sample_type?
I want to use a boost::accumulator for defining a moving average of my custom class:
boost::accumulators::accumulator_set<MySample, boost::accumulators::stats<boost::accumulators::tag::...
0
votes
1
answer
1k
views
Two boost::accumulators::accumulator_set interfere with each other
I have created a class Histogram in my code which is intended as a wrapper for boost::accumulators::accumulator_set from Boost 1.54. The things that seem important to my problem are those lines from ...
0
votes
1
answer
613
views
boost accumulator rolling count non zero
I am trying to use accumulators to find out statistics for a given activity per sec. Below are the two stats I would like to compute
Number of times activity has been triggered
Sum of the total ...
0
votes
1
answer
291
views
Finding values over (µ + 3 sigma) with Boost::accumulators
here is my problem: I have a 2D matrix of doubles containing data. The data is gaussian and and i need to find out which datapoints are the extrem ones. As a first estimation, values > (µ + 3 sigma) ...
7
votes
3
answers
3k
views
rolling min and rolling max for C++ boost?
I have some code that uses a Boost accumulator to track a mean across a rolling window -- "rolling mean". In addition to the rolling mean, I would like to track the minimum and maximum across this ...
1
vote
2
answers
910
views
What is the purpose of boost accumulator error_of<mean>?
The documentation of the error_of< mean > feature for boost accumulators states that it calculates the error of a mean value by the formula:
sqrt(variance / (count - 1)),
where the variance is ...
5
votes
1
answer
2k
views
Can boost accumulators be used as class members
I'm trying to use a boost accumulator to calculate a rolling mean. When I declare the variable inline like this:
#include <iostream>
#include <boost/accumulators/accumulators.hpp>
#...
4
votes
0
answers
2k
views
How does the mean tag affect the boost variance accumulator?
Including the mean tag returns an incorrect variance. I have tried this with both weighted and straight variances with similar results. I have included my code below.
Am I doing something wrong?
...
13
votes
2
answers
1k
views
Summing two boost::accumulator_set instances
I have recently discovered the excellent library boost::accumulators, and I would like to use it to replace some of my code that accumulates statistics.
One thing I cannot find in the documentation ...
1
vote
1
answer
816
views
Boost skewness c++ example
Any one have an example of using the boost skewness and weighted skewness accumulators?
All I found was the source code, and any examples of using this would be great.
any one know how to get these ...
0
votes
1
answer
1k
views
Using Boost Accumulators with Eigen::Vector types
I am having some problems combining Eigen::VectorXd types with the Boost accumulator library:
#include <iostream>
#include <Eigen/Core>
#include <boost/accumulators/accumulators.hpp>...
2
votes
2
answers
669
views
Using empty Boost accumulators
I am curious, what average is obtained from this code snippet? The accumulator is intended to be empty.
boost::accumulators::accumulator_set<
int,
boost::accumulators::features<boost::...
1
vote
1
answer
320
views
How do I use/access a user argument in a boost accumulator?
I have the gist of a custom accumulator. I want to know how to get an integer argument from the "argument pack", or if this is even possible:
namespace boost { namespace accumulators { namespace impl ...