[SciPy-dev] least squares error

Nils Wagner nwagner@iam.uni-stuttgart...
Mon Mar 9 15:37:04 CDT 2009


On Mon, 9 Mar 2009 06:16:03 -0700
  Ondrej Certik <ondrej@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@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