[SciPy-dev] Problem with a jump in scipy.stats.betaprime.cdf

josef.pktd@gmai... josef.pktd@gmai...
Mon Aug 25 09:54:57 CDT 2008


I am attaching the script that I used for testing the
stats.distributions with random parameters, which is a variation on
the tests in scipy stats. I get several additional test failures, but
I don't have time right now to look at them more closely.

I am checking the admissibility of the arguments with
``numpy.all(distfunc._argcheck(*args))``, but I saw that for many
distribution this method is not explicitly defined. So, the script
will try out parameters for which the distribution might not be well
defined. For some distributions Robert Kern already added a FIXME to
the source.

I get many domain errors which, I think, should be already fixed in
trunk, since in the scipy 0.6.0 version some automatic generation of
some properties of the distribution didn't work correctly. I read the
changelog a while ago and haven't checked again.

With this automatic fuzzing testing, I found several problems in
scipy.stats.distributions, but adding additional ``_argcheck`` for the
missing distributions would reduce the false failures. Many of the
problems seem to be in parameter ranges that are not ruled out by the
definition or by ``_argcheck``, but are not really the parameters that
are commonly used. In this sense, my test gives an upper bound for
"suspicious" distributions.

Also, I haven't looked in more detail at discrete distribution such as
Boltzman and Planck, which show test failures, but I'm not sure
whether using automatic kstest for these is ok.

I hope that helps, making stats.distribution and random number
generation a bit more robust.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_distributions_all.py
Type: text/x-python
Size: 4758 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-dev/attachments/20080825/329de265/attachment.py 

More information about the Scipy-dev mailing list