octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: polyfit: add the ability to specify the polynomial template


From: CdeMills
Subject: Re: polyfit: add the ability to specify the polynomial template
Date: Sun, 5 Feb 2012 08:56:54 -0800 (PST)

Jordi Gutiérrez Hermoso-2 wrote
> 
> 
> Okay, thanks. I didn't notice before that you wanted to patch on
> stable. The current plan is to be very conservative about patching
> stable, and only we only fix regressions and critical bugs on stable.
> I think this should be done on default instead.
> 
> Or is there a reason I'm not seeing for why this is a regression or
> critical bug?
> 
> 

The actual implementation gives a false sense of security. Ask for some
model order, and you'll get back a coefficients set. The condition of the
design matrix  is not tested. If you have a look in polyval.m, line 78:
 dy = sqrt (1 + sumsq (A/s.R, 2)) * s.normr / sqrt (s.df);

the inverse of s.R is used, even if it does not make sense. 

The modifications I made in polyfit:
- do not change the computation of s.R when n is a scalar
- already compute S.R inverse in s.C. If any value is NaN, then the design
matrix is not full rank, and the model order MUST be lowered.

So, I agree that in 99% of the cases the actual behaviour is not a
regression nor a bug. But in case of problems, you don't have specific
indicators about your model validity.

Regards

Pascal

--
View this message in context: 
http://octave.1599824.n4.nabble.com/polyfit-add-the-ability-to-specify-the-polynomial-template-tp4357144p4359284.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]