rcond in polyfit

Charles R Harris charlesr.harris at gmail.com
Fri Oct 13 15:58:35 CDT 2006

On 10/13/06, A. M. Archibald <peridot.faceted at gmail.com> wrote:
> On 12/10/06, Charles R Harris <charlesr.harris at gmail.com> wrote:
> > Hi all,
> >
> > I note that polyfit looks like it should work for single and double,
> real
> > and complex, polynomials. On the otherhand, the default rcond needs to
> > depend on the underlying precision. On the other, other hand, all the
> svd
> > computations are done with dgelsd or zgelsd, i.e., double precision.
> Even so
> > problems can arise from inherent errors of the input data if it is
> single
> > precision to start with. I also think the final degree of the fit should
> be
> > available somewhere if wanted, as it is an indication of what is going
> on.
> > Sooo, any suggestions as to what to do? My initial impulse would be to
> set
> > rcond=1e-6 for single, 1e-14 for double, make rcond a keyword, and kick
> the
> > can down the road on returning the actual degree of the fit.
> I'd also be inclined to output a warning (which the user can ignore,
> read or trap as necessary) if the condition number is too bad or they
> supplied an rcond that is too small for the precision of their data.

That sounds good, but how to do it? Should I raise an exception? I would
also have to modify lstsq so it returns the degree of the fit which would
mess up the current  interface.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20061013/f57529a4/attachment.html 
-------------- next part --------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
-------------- next part --------------
Numpy-discussion mailing list
Numpy-discussion at lists.sourceforge.net

More information about the Numpy-discussion mailing list