Re: [Numpy-discussion] polyfit in NumPy v1.7

2013-02-27 Thread josef . pktd
On Wed, Feb 27, 2013 at 3:01 PM, David Pine wrote: > Pauli, Josef, Chuck, > > I read over the discussion on curve_fit. I believe I now understand what > people are trying to do when they write about scaling the weighting and/or > covariance matrix. And I agree that what polyfit does in its curre

Re: [Numpy-discussion] polyfit in NumPy v1.7

2013-02-27 Thread David Pine
Pauli, Josef, Chuck, I read over the discussion on curve_fit. I believe I now understand what people are trying to do when they write about scaling the weighting and/or covariance matrix. And I agree that what polyfit does in its current form is estimate the absolute errors in the data from the

Re: [Numpy-discussion] polyfit in NumPy v1.7

2013-02-27 Thread Pauli Virtanen
27.02.2013 16:40, David Pine kirjoitti: [clip] > 2. I am sorry but I don't understand your response. The matrix Vbase > in the code is already the covariance matrix, _before_ it is scaled by > fac. Scaling it by fac and returning Vbase*fac as the covariance > matrix is wrong, at least according

Re: [Numpy-discussion] polyfit in NumPy v1.7

2013-02-27 Thread josef . pktd
Please post inline so we have the context. On Wed, Feb 27, 2013 at 9:40 AM, David Pine wrote: > Chuck, > > Thanks for the quick reply. > > 1. I see your point about zero weights but the code in its current form > doesn't take into account zero weights in counting the degrees of freedom, > as you

Re: [Numpy-discussion] polyfit in NumPy v1.7

2013-02-27 Thread David Pine
Chuck, Thanks for the quick reply. 1. I see your point about zero weights but the code in its current form doesn't take into account zero weights in counting the degrees of freedom, as you point out, so it seems to me like a moot point. More importantly, the documentation doesn't explain what t

Re: [Numpy-discussion] polyfit in NumPy v1.7

2013-02-27 Thread Charles R Harris
On Wed, Feb 27, 2013 at 6:46 AM, David Pine wrote: > As of NumPy v1.7, numpy.polyfit includes an option for providing weighting > to data to be fit. It's a welcome addition, but the implementation seems a > bit non-standard, perhaps even wrong, and I wonder if someone can enlighten > me. > > 1.

[Numpy-discussion] polyfit in NumPy v1.7

2013-02-27 Thread David Pine
As of NumPy v1.7, numpy.polyfit includes an option for providing weighting to data to be fit. It's a welcome addition, but the implementation seems a bit non-standard, perhaps even wrong, and I wonder if someone can enlighten me. 1. The documentation does not specify what the weighting array "w"