Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scipy: difference between optimize.fmin and optimize.leastsq

Tags:

python

scipy

What's the difference between scipy's optimize.fmin and optimize.leastsq? They seem to be used in pretty much the same way in this example page. The only difference I can see is that leastsq actually calculates the sum of squares on its own (as its name would suggest) while when using fmin one has to do this manually. Other than that, are the two functions equivalent?

like image 929
gandi2223 Avatar asked Jan 23 '26 10:01

gandi2223


1 Answers

Different algorithms underneath.

fmin is using the simplex method; leastsq is using least squares fitting.

like image 174
duffymo Avatar answered Jan 24 '26 23:01

duffymo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!