[SciPy-Dev] Subversion scipy.stats irregular problem with source code example

James Phillips zunzun at zunzun.com
Fri Oct 1 11:59:51 EDT 2010


On Thu, Sep 30, 2010 at 2:20 PM,  <josef.pktd at gmail.com> wrote:
> ppf is (very) expensive to calculate for some distributions.

> But I think using a global optimizer will be quite a bit more robust
> for several distributions where the likelihood doesn't have a well
> behaved shape.

Version Two of Robert Kern's edited code and my example file are
attached, this runs much faster.  It seems to work considerably better
that the first versions I posted.  I have folded optimize.fmin() into
Robert's code, among several other changes.  The example works for
powerlaw, beta, gamma, and pareto, although some of the distros are
very parameter sensitive as you might see at the end of the example.

This code would work much faster if it did not always solve for loc
and scale, in some distributions these are known from the data and
should not be solved for.  Please give this test code a try.

     James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.py
Type: text/x-python
Size: 2487 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20101001/9f84adf4/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diffev.py
Type: text/x-python
Size: 14580 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20101001/9f84adf4/attachment-0001.py>


More information about the SciPy-Dev mailing list