octave-maintainers
[Top][All Lists]
Advanced

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

Re: deprecating ols, gls


From: Rik
Subject: Re: deprecating ols, gls
Date: Thu, 27 Sep 2012 16:01:14 -0700

On 09/27/2012 12:03 PM, Jordi GutiƩrrez Hermoso wrote:
> On 27 September 2012 14:54, Rik <address@hidden> wrote:
>> From: Jordi Guti?rrez Hermoso <address@hidden>
>>> Any objection to deprecating ols and gls? They are both easily
>>> replaceable by other Octave functions. The backslash operator already
>>> does least squares.
>> I like them.  It's true that a backslash operator would *generally* do the
>> same thing, but if you take a look inside ols.m you will see that the
>> algorithm is actually a fair bit more complicated than just a simple
>> backslash operator.
> This is precisely why I want to deprecate ols, in fact. The algorithm
> in there is the textbook solution to the normal equations. I was
> tweaking it  while ago, trying to order the computations so that no
> large intermediate matrices would occur, and later realised that it
> would be sufficient to do
>
>     b = A\y;
>
> instead of
>
>     b = ols (y, A);
>
> If you want the extra outputs from ols, we should at least rewrite the
> function to use the backslash operator instead of writing out the
> normal equations like we learned in kindergarten. But between the
> backslash operator, polytfit, and corrcoef, you really have all of
> this covered.
I'm in favor of making things simpler  with the backslash operator.

--Rik


reply via email to

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