[CHANGESET]: Statistics function incorrectly computing median

Jaroslav Hajek highegg at gmail.com
Sun Mar 9 12:48:48 CDT 2008


On Sun, Mar 9, 2008 at 6:23 PM, Ben Abbott <bpabbott at mac.com> wrote:
>
>  On Mar 9, 2008, at 1:15 PM, Jaroslav Hajek wrote:
>
>  > On Sun, Mar 9, 2008 at 5:33 PM, Ben Abbott <bpabbott at mac.com> wrote:
>  >>
>  >> On Mar 9, 2008, at 10:43 AM, Jaroslav Hajek wrote:
>  >>
>  >>> Hi Ben,
>  >>>
>  >>> in case you're interested, I've created a loop-free version of
>  >>> __quantile__ (attached as __quantile_vec__). It appears to be
>  >>> several
>  >>> times faster than your version. OTOH, as you've expected, the memory
>  >>> consumption is certainly higher.
>  >>
>  >> I just glanced over the __quantile_vec__.m and noticed that the test
>  >> scripts refer to "quantile_vec__"
>  >>
>  >> I tried changing all references to __quantile_vec__, but the tests
>  >> failed.
>  >>
>  >> Ben
>  >>
>  >
>  > I'm sorry, I've ignored the tests so far (the name just got changed by
>  > search & replace).
>  > Looking at them now, they're bound to fail, as the __quantile_vec__ is
>  > supposed to operate on columns of a matrix, and you pass a row vector
>  > for x everywhere.
>  > I'll correct the tests.
>
>  Great. When this is done, your vectorized version will be a
>  replacement for quantile.m correct?
>
>  Ben
>
>
no. quantile.m will need to be changed; the call to dimfunc will be replaced by
a permute-reshape-__quantile__-reshape-ipermute sequence.


-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


More information about the Bug-octave mailing list