[SciPy-dev] parameter control in scipy.optimize.leastsq

Maximilian Fabricius mxhf@gmx....
Sun Oct 19 04:37:29 CDT 2008


I have been using scipy for about one and a half years now and have
been extremely pleased.

In this time I have made extensive use of scipy.optimize.leastsq.
While I am generally fairly happy
with its performance, I think it does lacks one important feature
which I am used to from similar
routines in other languages. (Please excuse if I have just missed that
feature so far.)

I would like to be able to control which parameters actually are
fitted. For example I would like to be able to

leastsq( redsiduals, p0, args=(y), fit=([True,True,False,True]) )

where the parameter "fit" would tell leastsq to leave the parameter
p0[2] untouched while fitting the others.

Right now I have to modify my source code to change the parameters
which are actually fit.

I'd be happy to participate and start getting my hands dirty if
someone would point out where to start.



More information about the Scipy-dev mailing list