[SciPy-user] Fitting - Gauss-normal distribution
Mon Feb 26 21:53:58 CST 2007
Anne Archibald wrote:
> On 26/02/07, David Warde-Farley <email@example.com> wrote:
>> So, it should be noted that the method of moments estimators for a
>> Gaussian distribution are also the maximum likelihood estimators, i.e.
>> the ones that maximize p(data|parameters), as well as the best least
>> square estimator (since taking the log of the density function gives you
>> scaled squared distance from the mean). So optimizing iteratively is
>> hardly necessary in this case.
> Indeed, fitting a Gaussian is pretty easy. If you want to fit
> something more sphisticated (even just two Gaussians, for a bimodal
> distribution), the way to go is probably not to constuct a histogram
> first. A good approach is to fit for a maximum-likelihood estimate.
> That is, if you have a pdf f(p1, p2, ..., pn, x) that has n parameters
> and gives the probability (density) for x given all those parameters,
> set up a nonlinear optimization for the product f(p1, ..., pn,
> x1)*...*f(p1, ..., xm).
Note that one standard iterative algorithm to fit a mixture of Gaussian
using maximum likelihood method (Expectation Maximization) is
implemented in the scipy.sandbox.pyem.
More information about the SciPy-user