[SciPy-User] ODR , Levenberg-Marquardt, non linear fitting and convergence: some assistance needed
Wed Apr 28 12:44:14 CDT 2010
On Wed, Apr 28, 2010 at 12:34, Charles R Harris
> On Wed, Apr 28, 2010 at 10:10 AM, <email@example.com> wrote:
>> On Mon, Apr 26, 2010 at 1:09 PM, ms <firstname.lastname@example.org> wrote:
>> > Hi,
>> > I am currently smashing my head on the following problem.
>> > I am trying to fit data to two equations, which are two levels of
>> > approximation for the same model. I am currently using ODR to fit.
>> > Of course the 2nd order approximation is mathematically bit more
>> > complicated than the first, involving a long summatory etc. but the
>> > resulting curve and behaviour are overall very similar.
>> > Now, in my tests, the 1st order approx. usually converges, while the 2nd
>> > order does not converge at all: not that it gives some wrong result, it
>> > remains stuck to the initial parameters with zero values in the
>> > covariance, etc. This even when I feed to ODR starting values very close
>> > to the "true" ones.
>> > I used fmin so far to bypass this problem, but it is really slow.
>> > Recently a collegue of mine told me that he can get Levenberg-Marquardt
>> > to minimize the untreatable (in my system) 2nd order approx, using
>> > Mathematica, out of the box.
>> > I have no idea unfortunately what are the differences between the
>> > Mathematica and the ODRPACK implementations of Levenberg-Marquardt, but
>> > if one can do it I think the other one can too. So, what should I try to
>> > improve my system? I tried increasing iterations, fixing X values etc.
>> > but nothing seems to work properly. Do you have any hint?
>> scipy.optimize.leastsq , and
> I use leastsq a lot and like it. It comes from MINPACK, I didn't know there
> was a version of Levenberg-Marquardt available in ODRPACK. Is there?
No. ODRPACK uses a trust-region algorithm instead of
Levenberg-Marquardt. They are conceptually similar, though.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the SciPy-User