[SciPy-user] Bug in stats?

David Huard david.huard at gmail.com
Tue Jan 24 09:45:59 CST 2006


I answered my own question about genextreme.fit. The problem was that for
the data set, the default initial value gave an -inf log-likelihood. I
assume that this perplexes the fmin routine who simply returns the initial
value.

David

2006/1/24, David Huard <david.huard at gmail.com>:
>
> Hi,
>
> I get the same problem, and had it with previous versions of scipy too.
> Also, I just found out that the fit method of the genextreme distribution
> returns [1.,0.,1.] systematically, no matter what the data set is.
>
> For example,
> >>> z = genextreme.rvs(.15, loc=3.8, scale=.17, size=30)
> >>> z
> array([3.57489347,  3.88036819,  3.78173901,...])
> >>> genextreme.fit(z)
> array([ 1.,  0.,  1.])
>
> Is it a bug or the stats package is not completed yet ?
>
> Thanks
>
> David
>
> 2006/1/19, Paul Ray <Paul.Ray at nrl.navy.mil>:
> >
> > Hi,
> >
> > I'm getting nan when I try to calculate the stats on any distribution
> > In [1]: import scipy
> > Overwriting fft=<function fft at 0x1458730> from scipy.fftpack.basic
> > (was <function fft at 0x14478b0> from numpy.dft.fftpack)
> > Overwriting ifft=<function ifft at 0x1458770> from
> > scipy.fftpack.basic (was <function inverse_fft at 0x14478f0> from
> > numpy.dft.fftpack)
> >
> > In [2]: scipy.stats.norm.stats()
> > Out[2]: (nan, nan)
> >
> > In [3]: scipy.__version__
> > Out[3]: '0.4.4'
> >
> > I get nan's for all distributions I have tried and the loc and scale
> > parameters don't seem to help.
> >
> > Is this a bug or am I using it wrong?
> >
> > Thanks,
> >
> > -- Paul
> >
> > --
> > Dr. Paul S. Ray              E-mail: Paul.Ray at nrl.navy.mil
> > Naval Research Laboratory    WWW   : http://xweb.nrl.navy.mil/
> > personnel/paulr/
> > Code 7655                    Phone : (202) 404-1619
> > Washington, DC 20375         AIM   : NRLPSR
> >
> >
> > _______________________________________________
> > SciPy-user mailing list
> > SciPy-user at scipy.net
> > http://www.scipy.net/mailman/listinfo/scipy-user
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.scipy.net/pipermail/scipy-user/attachments/20060124/b55a2984/attachment.htm


More information about the SciPy-user mailing list