[SciPy-dev] least squares error
Nils Wagner
nwagner at iam.uni-stuttgart.de
Mon Mar 9 16:37:04 EDT 2009
On Mon, 9 Mar 2009 06:16:03 -0700
Ondrej Certik <ondrej at certik.cz> wrote:
> Hi,
>
> I think each time I used leastsq, I also needed to
>calculate the
> errors in the fitted parameters. I use this method, that
>takes the
> output of leastsq and returns the parameters+errors.
>
> def calc_error(args):
> p, cov, info, mesg, success = args
> chisq=sum(info["fvec"]*info["fvec"])
> dof=len(info["fvec"])-len(p)
> sigma = array([sqrt(cov[i,i])*sqrt(chisq/dof) for i
>in range(len(p))])
> return p, sigma
>
> let's integrate this with leastsq? E.g. add a new key in
>the info dict?
>
> Ondrej
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
Hi,
there is another issue concerning least squares
http://projects.scipy.org/numpy/ticket/937
Nils
More information about the SciPy-Dev
mailing list