Hello, I would like to create a box plot and use the static calls of the boost. Median / average etc works well, but I need also the 25% & 75% quantil of my data, I'm using a boost::accumulators::accumulator_set for calculating statistical data. Can I / How can I use this for the quantil calculation or should I do this myself? Thanks Phil
On Mon, Jun 10, 2013 at 4:22 PM, Philipp Kraus
Hello,
I would like to create a box plot and use the static calls of the boost. Median / average etc works well, but I need also the 25% & 75% quantil of my data, I'm using a boost::accumulators::**accumulator_set for calculating statistical data. Can I / How can I use this for the quantil calculation or should I do this myself?
Thanks
Phil
Hi,
Have you tried p_square_quantile from boost::accumulator? http://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html... It uses a well-known algorithm to incrementally compute quantile estimation. Best. -- Marco
On 2013-06-10 20:58:40 +0200, sguazt said:
On Mon, Jun 10, 2013 at 4:22 PM, Philipp Kraus
wrote: Hello, I would like to create a box plot and use the static calls of the boost. Median / average etc works well, but I need also the 25% & 75% quantil of my data, I'm using a boost::accumulators::accumulator_set for calculating statistical data. Can I / How can I use this for the quantil calculation or should I do this myself?
Thanks
Phil
Hi,
Have you tried p_square_quantile from boost::accumulator?
http://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html...
It uses a well-known algorithm to incrementally compute quantile estimation.
Great thanks, I don't see this section. But another question: I have
defined my accumulator like
typedef boost::accumulators::accumulator_set
On Mon, Jun 10, 2013 at 9:13 PM, Philipp Kraus
On 2013-06-10 20:58:40 +0200, sguazt said:
On Mon, Jun 10, 2013 at 4:22 PM, Philipp Kraus < philipp.kraus@flashpixx.de> wrote: Hello,
I would like to create a box plot and use the static calls of the boost. Median / average etc works well, but I need also the 25% & 75% quantil of my data, I'm using a boost::accumulators::**accumulator_set for calculating statistical data. Can I / How can I use this for the quantil calculation or should I do this myself?
Thanks
Phil
Hi,
Have you tried p_square_quantile from boost::accumulator?
http://www.boost.org/doc/libs/**1_53_0/doc/html/accumulators/** user_s_guide.html#**accumulators.user_s_guide.the_** statistical_accumulators_**library.p_square_quantilehttp://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html...
It uses a well-known algorithm to incrementally compute quantile estimation.
Great thanks, I don't see this section. But another question: I have defined my accumulator like typedef boost::accumulators::**accumulator_set
> Accumulator; Within the example the quantil value is set in the Ctor of the accumulator. In my case I need two quantiles 0.25 & 0.75 so I need two p_square_quantile parts in my accu, so how I can add the two quantils and how I can set it to the values?
You can use the extended_p_square_quantile ;) See the example here: http://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html... Best, -- Marco
On 2013-06-10 21:44:21 +0200, sguazt said:
On Mon, Jun 10, 2013 at 9:13 PM, Philipp Kraus
wrote: On 2013-06-10 20:58:40 +0200, sguazt said: On Mon, Jun 10, 2013 at 4:22 PM, Philipp Kraus
wrote: Hello, I would like to create a box plot and use the static calls of the boost. Median / average etc works well, but I need also the 25% & 75% quantil of my data, I'm using a boost::accumulators::accumulator_set for calculating statistical data. Can I / How can I use this for the quantil calculation or should I do this myself?
Thanks
Phil
Hi,
Have you tried p_square_quantile from boost::accumulator?
http://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html...
It uses a well-known algorithm to incrementally compute quantile estimation.
Great thanks, I don't see this section. But another question: I have defined my accumulator like typedef boost::accumulators::accumulator_set
> Accumulator; Within the example the quantil value is set in the Ctor of the accumulator. In my case I need two quantiles 0.25 & 0.75 so I need two p_square_quantile parts in my accu, so how I can add the two quantils and how I can set it to the values?
You can use the extended_p_square_quantile ;)
See the example here:
http://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html...
Thanks, but I can not create a working example and I can not compile
the example code on the page.
I have set up my typedef to:
typedef boost::accumulators::accumulator_set
**
On 2013-06-10 21:44:21 +0200, sguazt said:
On Mon, Jun 10, 2013 at 9:13 PM, Philipp Kraus
wrote:
On 2013-06-10 20:58:40 +0200, sguazt said:
On Mon, Jun 10, 2013 at 4:22 PM, Philipp Kraus
wrote: Hello,
I would like to create a box plot and use the static calls of the boost. Median / average etc works well, but I need also the 25% & 75% quantil of my data, I'm using a
boost::accumulators::accumulator_set for calculating statistical data. Can I / How can I use this for the quantil calculation or should I do this myself?
Thanks
Phil
Hi,
Have you tried p_square_quantile from boost::accumulator?
http://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html...
It uses a well-known algorithm to incrementally compute quantile estimation.
Great thanks, I don't see this section. But another question: I have defined my accumulator like
typedef boost::accumulators::accumulator_set
boost::accumulators::tag::count,
boost::accumulators::tag::sum,
boost::accumulators::tag::median,
boost::accumulators::tag::mean,
boost::accumulators::tag::variance,
boost::accumulators::tag::min,
boost::accumulators::tag::max,
boost::accumulators::tag::p_square_quantile
> > Accumulator;
Within the example the quantil value is set in the Ctor of the accumulator. In my case I need two quantiles
0.25 & 0.75 so I need two p_square_quantile parts in my accu, so how I can add the two quantils and how I
can set it to the values?
You can use the extended_p_square_quantile ;)
See the example here:
http://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html...
Thanks, but I can not create a working example and I can not compile the example code on the page.
I have set up my typedef to:
typedef boost::accumulators::accumulator_set
boost::accumulators::tag::count,
boost::accumulators::tag::sum,
boost::accumulators::tag::median,
boost::accumulators::tag::mean,
boost::accumulators::tag::variance,
boost::accumulators::tag::min,
boost::accumulators::tag::max,
boost::accumulators::tag::extended_p_square
> > Accumulator;
and try to create the ctor call with
boost::array<double> probs = {0.25, 0.75};
x = Accumulator( boost::accumulators::tag::extended_p_square::probabilities = probs );
I get the error:
error: wrong number of template arguments (1, should be 2)
/Boost/1.53.0/include/boost/fusion/support/tag_of.hpp:24: error: provided for 'template
class boost::array' error: invalid type in declaration before '=' token
error: scalar object 'probs' requires one element in initializer
I don't see my mistake at the moment. Thanks a lot for your help, this calls seems to be the correct parameter for creating the whisker on a box plot.
I think the error refers to boost::array which needs an additional
On Mon, Jun 10, 2013 at 10:56 PM, Philipp Kraus
On 2013-06-11 10:33:14 +0200, sguazt said:
On Mon, Jun 10, 2013 at 10:56 PM, Philipp Kraus
wrote: On 2013-06-10 21:44:21 +0200, sguazt said: On Mon, Jun 10, 2013 at 9:13 PM, Philipp Kraus
wrote: On 2013-06-10 20:58:40 +0200, sguazt said: On Mon, Jun 10, 2013 at 4:22 PM, Philipp Kraus
wrote: Hello, I would like to create a box plot and use the static calls of the boost. Median / average etc works well, but I need also the 25% & 75% quantil of my data, I'm using a boost::accumulators::accumulator_set for calculating statistical data. Can I / How can I use this for the quantil calculation or should I do this myself?
Thanks
Phil
Hi,
Have you tried p_square_quantile from boost::accumulator?
http://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html...
It uses a well-known algorithm to incrementally compute quantile estimation.
Great thanks, I don't see this section. But another question: I have defined my accumulator like typedef boost::accumulators::accumulator_set
> Accumulator; Within the example the quantil value is set in the Ctor of the accumulator. In my case I need two quantiles 0.25 & 0.75 so I need two p_square_quantile parts in my accu, so how I can add the two quantils and how I can set it to the values?
You can use the extended_p_square_quantile ;)
See the example here:
http://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html...
Thanks, but I can not create a working example and I can not compile the example code on the page. I have set up my typedef to: typedef boost::accumulators::accumulator_set
> Accumulator; and try to create the ctor call with boost::array<double> probs = {0.25, 0.75}; x = Accumulator( boost::accumulators::tag::extended_p_square::probabilities = probs );
I get the error: error: wrong number of template arguments (1, should be 2) /Boost/1.53.0/include/boost/fusion/support/tag_of.hpp:24: error: provided for 'template
class boost::array' error: invalid type in declaration before '=' token error: scalar object 'probs' requires one element in initializer I don't see my mistake at the moment. Thanks a lot for your help, this calls seems to be the correct parameter for creating the whisker on a box plot.
I think the error refers to boost::array which needs an additional parameter representing the (fixed) sized of the array.
Also, you can replace tag::median with the calculation of 0.50th quantile:
using namespace boost::accumulators;
typedef accumulator_set
> accumulator_t; int main() { boost::array
probs = {0.25, 0.50, 0.75}; accumulator_t acc(extended_p_square_probabilities = probs); }
I got compilation errors if I add tag::variance, tag::min and tag::max. Unfortunately, I don't know how to solve it. Sorry
In the meanwhile, you can always keep two separate accumulators.
That's not nice, because I use a lot of these accumulaters and they must calculate min / max / quantil. I can build a struct with 2 differend accumultors, but this is a hack Phil
On 2013-06-11 10:33:14 +0200, sguazt said:
On Mon, Jun 10, 2013 at 10:56 PM, Philipp Kraus
wrote: On 2013-06-10 21:44:21 +0200, sguazt said: On Mon, Jun 10, 2013 at 9:13 PM, Philipp Kraus
wrote: On 2013-06-10 20:58:40 +0200, sguazt said: On Mon, Jun 10, 2013 at 4:22 PM, Philipp Kraus
wrote: Hello, I would like to create a box plot and use the static calls of the boost. Median / average etc works well, but I need also the 25% & 75% quantil of my data, I'm using a boost::accumulators::accumulator_set for calculating statistical data. Can I / How can I use this for the quantil calculation or should I do this myself?
Thanks
Phil
Hi,
Have you tried p_square_quantile from boost::accumulator?
http://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html...
It uses a well-known algorithm to incrementally compute quantile estimation.
Great thanks, I don't see this section. But another question: I have defined my accumulator like typedef boost::accumulators::accumulator_set
> Accumulator; Within the example the quantil value is set in the Ctor of the accumulator. In my case I need two quantiles 0.25 & 0.75 so I need two p_square_quantile parts in my accu, so how I can add the two quantils and how I can set it to the values?
You can use the extended_p_square_quantile ;)
See the example here:
http://www.boost.org/doc/libs/1_53_0/doc/html/accumulators/user_s_guide.html...
Thanks, but I can not create a working example and I can not compile the example code on the page. I have set up my typedef to: typedef boost::accumulators::accumulator_set
> Accumulator; and try to create the ctor call with boost::array<double> probs = {0.25, 0.75}; x = Accumulator( boost::accumulators::tag::extended_p_square::probabilities = probs );
I get the error: error: wrong number of template arguments (1, should be 2) /Boost/1.53.0/include/boost/fusion/support/tag_of.hpp:24: error: provided for 'template
class boost::array' error: invalid type in declaration before '=' token error: scalar object 'probs' requires one element in initializer I don't see my mistake at the moment. Thanks a lot for your help, this calls seems to be the correct parameter for creating the whisker on a box plot.
I think the error refers to boost::array which needs an additional parameter representing the (fixed) sized of the array.
Also, you can replace tag::median with the calculation of 0.50th quantile:
using namespace boost::accumulators;
typedef accumulator_set
> accumulator_t; int main() { boost::array
probs = {0.25, 0.50, 0.75}; accumulator_t acc(extended_p_square_probabilities = probs); }
I got compilation errors if I add tag::variance, tag::min and tag::max. Unfortunately, I don't know how to solve it. Sorry
In the meanwhile, you can always keep two separate accumulators.
I try this with boost 1.53, f I try to create my accumulator with
(disable all except the quantil) and call
boost::array
Am 11.06.2013 um 13:59 schrieb Jeff Flinn:
On 6/11/2013 6:02 AM, Philipp Kraus wrote:
On 2013-06-11 10:33:14 +0200, sguazt said:
[snip]
Phil
You might re-post with a subject line starting with "[accumulators] ..." to get more attention to your problem.
Jeff
Thanks Jeff, I think this is better, so I reopen the thread again and post all information within the new thread Phil
participants (3)
-
Jeff Flinn
-
Philipp Kraus
-
sguazt