[SciPy-User] Optimization problem using fmin_slsqp

Matt Newville newville at cars.uchicago.edu
Tue Apr 8 20:10:42 EDT 2014


Hi Qing,

On Tue, Apr 8, 2014 at 2:10 PM, Qing Yu <yuqingpsy at gmail.com> wrote:
> Hi Matt,
>
> Thanks so much! I've actually tried the 'minimize' function in
> scipy.optimize. There are several constrained optimization methods in
> 'minimize' and among them 'SLSQP' seems to be equivalent to the method used
> in fmin_slsqp; I got similar bad fitting results using these two functions.
> Meanwhile, using the 'L-BFGS-B' method in 'minimize', I can get similar good
> fitting results as 'leastsq'. But I'm not sure how these two algorithms
> differ.

I think your experience matches many others: for many real data
fitting problems, it's hard to know how well many of these algorithms
will really work.   Just the fact that there are so many methods
available gives a hint that they aren't all robust in all situations,
right?     Then again, you're asking to fit four parameters given only
six observations.... that's going to to be challenging for most of
these methods.

> I then tried the 'lmfit' method you provided, and it seems that this method
> is exactly what I want, though I've no idea how it adds bounds to 'leastsq'.
> Thanks again for your help!

The bounds method used in lmfit are described at
http://lmfit.github.io/lmfit-py/bounds.html

--Matt



More information about the SciPy-User mailing list