[SciPy-User] leastsq interface and features

Vincent Davis vincent at vincentdavis.net
Sat May 29 11:06:42 EDT 2010


On Fri, May 28, 2010 at 10:47 PM, bowie_22 <m.boumans at gmx.net> wrote:

> Hello,
>
> at the moment am I am evaluating scipy as a subsitute for Matlab.
> One important use case for me is to fit a model to measured data.
>
> In Matlab I use lsqnonlin from the Optimization Toolbox.
> In Scipy I would use leastsq.
>
> By comparing the 2 approaches with a "daily use" point of view I see the
> following improvements for the scipy module
>
> 1) setting the options for the algorithm:
>   ML uses a structure together with optimset optimget
>   --> lsqnonlin has a quite short signature
> IMPROVEMENT: introduce a common options structure for all optimization
> algos
>
> 2) there is the possibilty to set an output function that is called in each
> iteration step in ML. That can be used for displaying the current status of
> the
> optimization. For me a quite important point as my customers want to "see"
> what
> happens (not just throwing measured data to an algorithm and get back a set
> of
> numbers)
>  IMPROVEMENT: introduce a output function that can be called each iteration
>
> 3) give lower and upper bounds for the optimization variables. Also quite
> important as in my uses cases you have normally an idea in which range your
> parameter should be (mass of a car 1200 - 1800 kg). In ML you can provide
> this
> knowledge as lower bounds and upper bounds to lsqnonlin.
> IMPROVEMENT: introduce lower and upper bounds
>
> My problem:
> How can I help to get this improvements to scipy? Is this the correct
> address to
> ask?
>

This is a good place to ask, I am surprised you have not already gotten
several responses.

I see in the docs that (“leastsq” is a wrapper around MINPACK’s lmdif and
lmder algorithms.)

You can also file a ticket at scipy, an example would be
http://projects.scipy.org/scipy/ticket/808
You can take a look at the source code.
http://projects.scipy.org/scipy/browser/trunk/scipy/optimize/minpack.py

That said you might want to look at http://statsmodels.sourceforge.net/  And
you could help by contributing :) This is not a part of the project I am
real familiar with but should be.

I don't have much more in the way of answers, I just don't know them :)

Vincent


> Regs
>
> Marcus
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>

  *Vincent Davis
720-301-3003 *
vincent at vincentdavis.net
 my blog <http://vincentdavis.net> |
LinkedIn<http://www.linkedin.com/in/vincentdavis>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20100529/ee7fe9d7/attachment.html>


More information about the SciPy-User mailing list