|
Boost Users : |
Subject: Re: [Boost-users] quantil
From: sguazt (marco.guazzone_at_[hidden])
Date: 2013-06-10 15:44:21
On Mon, Jun 10, 2013 at 9:13 PM, Philipp Kraus
<philipp.kraus_at_[hidden]>wrote:
> On 2013-06-10 20:58:40 +0200, sguazt said:
>
>
>>
>> On Mon, Jun 10, 2013 at 4:22 PM, Philipp Kraus <
>> philipp.kraus_at_[hidden]> 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_quantile<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_quantile>
>>
>> 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<double,
> boost::accumulators::stats<
> 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:
Best,
-- Marco
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net