[SciPy-User] fit to discrete distr?
Robert Kern
robert.kern at gmail.com
Wed Jul 15 09:43:46 EDT 2015
Construct a function that computes the negative log-likelihood:
def f(params, dist=dist, data=data):
return -dist.logpmf(data, *params).sum()
Use optimize.minimize() on that with appropriate configuration.
On Wed, Jul 15, 2015 at 2:34 PM, Neal Becker <ndbecker2 at gmail.com> wrote:
> http://docs.scipy.org/doc/scipy/reference/tutorial/stats.html
> says 'no fit' method is available on discrete distr, while:
>
> http://docs.scipy.org/doc/scipy/reference/tutorial/stats/discrete.html
> has a section on 'fitting data'.
>
> Can I use scipy to fit my data to a discrete distr (nbinom, in this case)?
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
--
Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20150715/cea4b877/attachment.html>
More information about the SciPy-User
mailing list