[SciPy-User] scipy.stats.distributions.erlang - "boring" consensus building in a ticket
nicky van foreest
vanforeest at gmail.com
Mon May 7 07:13:09 EDT 2012
> Do you think it would be useful to have fit() restrict to integers?
>
> I guess currently nobody uses erlang.fit() because, at least in the
> example, it doesn't work with default parameters.
>
> import numpy as np
> from scipy import stats
>
> #add fitstart to erlang, otherwise it doesn't work
> stats.erlang._fitstart = stats.gamma._fitstart
>
> np.random.seed(876589)
> rvs = stats.erlang.rvs(5, size=500)
>
> for dist in [stats.erlang, stats.gamma]:
> print '\n', dist.name
> p0 = dist.fit(rvs)
> print stats.gamma.nnlf(p0, rvs), p0
> print
>
> for k in range(10):
> p = dist.fit(rvs, f0=k)
> print dist.nnlf(p, rvs), p
I think it returning an int is here to be exptected by an Erlang user.
Hence, yes.
I ran the above code, but got some warnings:
Warning: invalid value encountered in subtract
I did not pursue the origin of this though.
>
> Josef
>
>>
>> Nicky
>>
>>
>>
>> On 5 May 2012 22:20, <josef.pktd at gmail.com> wrote:
>>> Should we restrict the shape parameter to be an integer instead of a float?
>>>
>>> http://projects.scipy.org/scipy/ticket/1647
>>>
>>> Let's ask the users:
>>>
>>> Does anyone want an exception if the shape parameter is not an integer?
>>> Is there a demand or use case for estimating the shape parameter as an
>>> integer instead of a float?
>>>
>>> right now erlang and gamma are essentially the same, as far as I can see
>>>
>>> Josef
>>> _______________________________________________
>>> SciPy-User mailing list
>>> SciPy-User at scipy.org
>>> http://mail.scipy.org/mailman/listinfo/scipy-user
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User at scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
More information about the SciPy-User
mailing list