You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Leanne Guy <Le...@unige.ch> on 2010/11/03 11:44:35 UTC

Re: [math] speeding up percentile based statistics


On 9/27/10 09:55 PM, luc.maisonobe@free.fr wrote:
> ----- "Gilles Sadowski"<gi...@harfang.homelinux.org>  a écrit :
>
>>> [...]
>>>>> ---CUT---
>>>>>     double[] a = new double[] {1, 2, 3};
>>>>>     double[] b = new double[] {1, 2, 3, 4, 5};
>>>>>     Percentile pA = new Percentile(a);
>>>>>     Percentile pB = new Percentile(b);
>>>>>
>>>>>     double r;
>>>>>     r = pA.evaluate(50);
>>>>>     r = pB.evaluate(50);
>>>>>     r = pA.evaluate(50);
>>>>>     r = pB.evaluate(50);
>>>>> ---CUT---
>>>>>
>>>>> That way, later calls can benefit from whatever preprocessing was
>> done in
>>>>> previous calls.
>>>>> The instance will always control all the information needed (e.g.
>> after a
>>>>> call to an "addValues" method) for the processing without the
>> need to rely
>>>>> on the user for calling "clearCache" whenever necessary.
>>>>>
>>>>>
>>>>> Gilles
>>>> +1
>>>> I think that is a really good idea and I agree on the points
>> made.
>>> This proposal is point 4. It breaks the UnivariateStatistic API and
>> it
>>> breaks what the user found interesting in this API, i.e. have a
>> general
>>> statistics framework where one statistic can be replaced by another
>> one.
>>> If you read again one of my earlier messages from today, we will
>> combine
>>> this method (i.e. evaluate without values) and the
>> UnivariateStatistics API.
>>> Perhaps we could add these new methods (i.e. addValues and evaluate
>>> without values) to UnivariateStatistics, but this can only be done
>> on 3.0.
>>
>> +1
>>
>> Is it urgent to complicate the code? If the API conflicts with a
>> necessary
>> efficiency improvement, why not postpone the change?
> I was trying to help Leanne as 3.0 is not going to be ready soon.
> I'm OK with a change in 3.0 as pushing these methods up to the interface is really the best solution.
>
Thanks Luc for your efforts to help. I'm of course still very interested 
in seeing these changes
but I can wait until 3.0 so that the best solution can be implemented

Leanne

-- 
-----------------------------------------------------------------------
Leanne Guy
Variability Processing Group, Gaia Project, ESA
Observatoire de Geneve / ISDC Astrophysics Data Centre
Chemin d'Ecogia 16, CH-1290 Versoix,  Switzerland

Email: leanne.guy-at-unige.ch
Tel: +41 22 379 2151    Fax: +41 (0)22 37 92 135
WWW: http://isdc.unige.ch/~leanne/   Skype: leanneobsge
-----------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org