[SciPy-Dev] parameters of fitting data
Krzysztof Berniak
krzysztof.berniak@gmail....
Tue Nov 22 14:56:05 CST 2011
Hello,
I'm writing script in python, which fitting exponencial curve to data (
f(x) = a*exp(x*b).
To resolve this problem I use scipy.
It works fine. I get in v1 new parameters, but where is calculation errors
of this parameters ?
When I use gnuplot my results look like this:
Final set of parameters Asymptotic Standard Error
======================= ==========================
a1 = 12.1566 +/- 0.2286
(1.88%)
b1 = 0.000858396 +/- 4.362e-006
(0.5082%)
^
|
where in
scipy i get this numbers
This is my code
def main():
z,f = numbers_col()
fitfunc = lambda v, z: v[0]*exp(z*v[1])
errfunc = lambda v, z,f: fitfunc(v,z) - f
v0 = [10., 0.005]
v1,success = optimize.leastsq(errfunc, v0[:], args =
(z,f),full_output=True)
regards and please help,
Cristopher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20111122/a5a6b3eb/attachment.html
More information about the SciPy-Dev
mailing list