[SciPy-User] curve fitting with fixed parameters
Meesters, Christian
meesters at aesku.com
Wed Jun 8 05:58:46 EDT 2011
Hi,
Recently I started a thread "curve_fit - fitting a sum of 'functions'". Thanks for all the ideas: I am working to get proper weights for the actual function I would like to fit.
Along the road I stumbled on yet another problem: Perhaps the wording in the subject line is a bit sloppy. However, I would like to fit a rather complex function and actually the problem would be underdetermined, but luckily I have known parameters. Well, I could put them in the function to fit using the global keyword, but that seems a bit awkward ...
Is there a way to set some parameters of a fit as 'fixed', say with scipy.optimize.curve_fit or scipy.optimize.leastsq? (If I put a particular known parameter in p0 of curve_fit, the function ends up in a falls local minimum. Only if a hard code that parameter in within the function to fit I get the correct result, but this parameter needs is different from dataset to dataset.)
Any ideas / pointers for me?
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110608/41fe70c0/attachment.html>
More information about the SciPy-User
mailing list