I have a function containing:
Independent variable X,
Dependent variable Y
Two fixed parameters a and b.
Using identical experimental data, both the curve_fit
and leastsq
functions could be fitted to the function with similar results.
Using curve_fit
I have:
[ 2.50110215e-04 , 7.80730380e-05]
for fixed parameters a and b.
Using leastsq
I have:
[ 2.50110267e-04 , 7.80730843e-05]
for fixed parameters a and b.
I would like to know if are there any differences in both of them, if so, what are the what situations should I use curve_fit
and what situation should I use leastsq
?