[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: polyfit: add the ability to specify the polynomial template
From: |
Ben Abbott |
Subject: |
Re: polyfit: add the ability to specify the polynomial template |
Date: |
Sat, 04 Feb 2012 10:27:47 -0500 |
On Feb 4, 2012, at 9:51 AM, CdeMills wrote:
> Hello,
>
> I enclose a patch against the stable branch polyfit.m in order to specify
> the polynomial template, i.e. giving the ability to force some of the
> coefficients to be zero. This is accomplished by passing a logical vector
> instead of a scalar for the last argument. Also compute C, the inverse of
> r.'*r, which is the unscaled covariance matrix. To obtain the standard
> deviation, simply take sqrt(diag(C)/df)*normr; where df are the degrees of
> freedom and normr the residual norm.
>
> Changelog entry:
>
> polyfit.m: add the ability to specify polynomial template
>
>
> Regards
>
> Pascal
>
> http://octave.1599824.n4.nabble.com/file/n4357144/polyfit.pat polyfit.pat
I like your idea. I've been thinking of adding weights to polyfit as well. I
haven't started on it, but I think the important part is embodied in one line.
- p = r \ (q' * y);
+ p = (r \ (q' * (w .* y)));
My work on this isn't at the top of my list. If you're inclined to add this as
well, please do.
Ben
- polyfit: add the ability to specify the polynomial template, CdeMills, 2012/02/04
- Re: polyfit: add the ability to specify the polynomial template,
Ben Abbott <=
- Re: polyfit: add the ability to specify the polynomial template, Jordi Gutiérrez Hermoso, 2012/02/04
- Re: polyfit: add the ability to specify the polynomial template, CdeMills, 2012/02/05
- Re: polyfit: add the ability to specify the polynomial template, Jordi Gutiérrez Hermoso, 2012/02/05
- Re: polyfit: add the ability to specify the polynomial template, CdeMills, 2012/02/05
- Re: polyfit: add the ability to specify the polynomial template, Jordi Gutiérrez Hermoso, 2012/02/07
- Re: polyfit: add the ability to specify the polynomial template, John W. Eaton, 2012/02/07
- Re: polyfit: add the ability to specify the polynomial template, CdeMills, 2012/02/07
- Re: polyfit: add the ability to specify the polynomial template, Jordi Gutiérrez Hermoso, 2012/02/07