[PD] array quantile problem

cyrille henry ch at chnry.net
Fri Dec 23 23:17:46 CET 2016


Hhanks for the explanation.

I think the "so for instance, the 0.5 quantile is the median of the array." sentence of the documentation is confusion.

anyway, is there a fast way to get the median of a list?
(faster than ordering the list with an abstraction and getting the middle value)


thanks
Cyrille

  

Le 23/12/2016 à 22:58, Christof Ressi a écrit :
> The array doesn't represent a list of values but rather a distribution of values where each y represents the weight of its x value. Changing your list to 1 2 3 4 5 6 7 8 9 will make it more clear to understand because the actual values are then: 0 1 1 2 2 2 3 3 3 3 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8.  Therefore 6 is the correct median.
>
> Christof
>
>> Gesendet: Freitag, 23. Dezember 2016 um 21:55 Uhr
>> Von: "cyrille henry" <ch at chnry.net>
>> An: "pd-list at lists.iem.at" <pd-list at lists.iem.at>
>> Betreff: [PD] array quantile problem
>>
>> Hello,
>>
>> I'm trying to use the [array quantile] object, but it is not doing what I understand from the documentation.
>> the help file specify that the 0.5 quantile is the median.
>> I'm using the wikipedia definition of the median :
>> https://en.wikipedia.org/wiki/Median
>>
>> So the list (0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9) admit 0.5 as median.
>>
>> [array quantile] return 6.
>>
>> In attachment, a patch that demonstrate this behaviours, and other list that return value that I did not expect.
>>
>> I'm using pd 47.1.
>> Did I made something wrong, or is that just a bug in [array quantile]?
>>
>> cheers
>> C
>> _______________________________________________
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>



More information about the Pd-list mailing list