[SciPy-User] robust fit

josef.pktd at gmail.com josef.pktd at gmail.com
Tue May 31 11:43:19 EDT 2011


On Tue, May 31, 2011 at 11:37 AM, Sturla Molden <sturla at molden.no> wrote:
> Den 31.05.2011 17:30, skrev josef.pktd at gmail.com:
>>
>> Do you have an example for this?
>> > From the docstring of lmdif and lmder it can only minimize sum of squares, e.g.
>>
>> c     the purpose of lmdif is to minimize the sum of the squares of
>> c     m nonlinear functions in n variables by a modification of
>> c     the levenberg-marquardt algorithm.
>>
>
> Huh?
>
> If it can minimize sum(x*x), then it can also minimize sum(w*x*x) by the
> transformation z = sqrt(w)*x.

Yes, that's what scipy.optimize.curve_fit is doing, but it is still a
sum of squares, your statement was *any* cost function (not just
quadratic, sum of squares):

> It can
> be used to minimize any cost function if you provide the Jacobian.

Just getting mislead by the definition of *any*.

Josef

>
> Sturla
>
>
>
> _______________________________________________
> 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