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

James Phillips zunzun@zunzun....
Fri Oct 1 13:18:52 CDT 2010


On Fri, Oct 1, 2010 at 8:07 AM,  <josef.pktd@gmail.com> wrote:
> On Fri, Oct 1, 2010 at 1:21 PM, James Phillips <zunzun@zunzun.com> wrote:
>>
>> distribution: gamma took 206.991358995 seconds to run
>> de parameters [  1.40727512e+02  -5.83784812e+00   5.55091421e-02]
>> nnlf: 26.7597491247
>
>>>> scipy.stats.gamma.pdf(np.linspace(0,5,11), 300.5609591140931425, loc=0, scale=0.5)
> array([ 0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.])
>>>> scipy.stats.gamma.pdf(np.linspace(0,5,11), 300.5609591140931425, loc=0, scale=0.25)
> array([  0.,   0.,   0.,   0.,   0.,   0.,  NaN,  NaN,  NaN,  NaN,  NaN])
>
> Given that you are doing a randomized search, there might not be
> enough restrictions that the parameters make sense. I did some fuzz
> testing when I got started with distributions but haven't run them in
> a long time. Your random parameters might hit some range where the
> numerical accuracy and correct results have never been checked.
> It's possible that fmin could get stuck with some nans in the results.
> I don't know how many dark corners are left.

You have loc=0 where the GA fit the example data set to -5.8 or so,
and I see from your results that the NaNs are dependent on your scale
value of 0.5 or 0.25.

     James


More information about the SciPy-Dev mailing list