octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #34363] Poor performance for certain statistic


From: Lachlan Andrew
Subject: [Octave-bug-tracker] [bug #34363] Poor performance for certain statistical distributions
Date: Tue, 15 Sep 2015 11:28:48 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36

Follow-up Comment #12, bug #34363 (project octave):

Here are drafts for new  binoinv.m  and nbininv.m.

In version 4.0.0,  binoinv.m  didn't have a while(1) loop and so was "safe". 
It would run at most n iterations.  However, the current version is about 10
times faster, on my tests.

These are both probably overkill given how often they are used, but it was fun
writing them :)

I chose not to use Gile's algorithm for these.  The quick read I had of the
paper Rik found suggested that it is only useful for n>500.  That paper was by
a summer student -- presumably an undergrad getting a feel for research -- and
so I think it was a case of "Look! We can apply this technique more broadly",
rather than aiming for something practical.

Regarding the other distributions, I think betainv.m and gaminv.m are doing a
Newton search, which is pretty efficient.  It can't be vectorised because each
iteration relies on the result of the previous.  I recommend we keep them as
they are.  (They may have been updated since the original bug report.)

I don't understand the hygeXXX.m code well enough to comment.

(file #34889, file #34890)
    _______________________________________________________

Additional Item Attachment:

File name: binoinv.m                      Size:6 KB
File name: nbininv.m                      Size:5 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34363>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]