octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #31474] autocor.m & autocov.m are wrong


From: Rik
Subject: [Octave-bug-tracker] [bug #31474] autocor.m & autocov.m are wrong
Date: Fri, 29 Oct 2010 00:42:43 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.11) Gecko/20101013 Ubuntu/9.10 (karmic) Firefox/3.6.11

Update of bug #31474 (project octave):

                  Status:                    None => Wont Fix               
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #8:

After doing some research, I find there is very little definitional certainty
about how to calculate the cross covariance (and hence the autocovariance). 
As you have noted, in the field of statistics it tends to be calculated one
way, and in signal processing in a slightly different manner.  Even with
mostly similar algorithms there is an abundance of normalization factors which
can be applied.

To illustrate the ridiculousness of it all, Matlab, can calculate the
cross-covariance in no less than 4 different manners
(http://www.mathworks.com/help/toolbox/signal/xcov.html).  For Matlab, the
default option, 'none', produces what you were expecting.  Octave uses the
equivalent of the 'unbiased' option.  Octave is not wrong, just different.

After some discussion on the octave-maintainers mailing list, it was decided
that these two functions do not really belong in the core of Octave.  They are
not needed by the general user, and the choice of a particular method for
calculating the cross covariance relies on the user's understanding of their
dataset and interests.  The signal package from Octave-Forge contains the two
functions xcorr and xcov which reproduce the Matlab functions and their
variety of normalizations.  I suggest using those in place of autocor and
autocov so that you may explicitly choose which algorithm normalization you
desire. 

Since NOW, these functions are deprecated.  A warning message will be
displayed when they are used for the first time.  The documentation will now
explain the particular calculation that autocov and autocorr use, and will
also point to the Octave Forge signal packages.  They will be removed in
Octave 3.6.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31474>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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