pspp-dev
[Top][All Lists]
Advanced

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

[patch #6650] one pass covariance algorithm


From: Jason H Stover
Subject: [patch #6650] one pass covariance algorithm
Date: Fri, 31 Oct 2008 16:16:09 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16

Follow-up Comment #15, patch #6650 (project pspp):

Your two comments made me realize the need for two distinct functions to
accumulate the covariance matrix: one to be used for listwise deletion of
missing values, and another to be used for pairwise deletion. So I made those
two functions, and now covariance_accumulate just calls the appropriate one.
The question of pairwise or listwise deletion is the most important question
when computing the covariance matrix, so this is a big improvement.

I also altered the use of MV_ANY to be a value stored in the struct during
initialization. This made the list of arguments to covariance_matrix_init
longer.

About point number 2: As John said, update_moments does not depend on a test
that is invariant in the loops in which it is called, so I made the change he
suggested. But cat_value_update does depend on the loop: It checks to see if a
variable is categorical, and it's called inside a loop over the variables. I
don't see any way around this without making the code more cumbersome, for
example, by re-writing another, custom version of cat_value_update.

Latest patch attached.

(file #16766)
    _______________________________________________________

Additional Item Attachment:

File name: cov5.patch                     Size:18 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?6650>

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





reply via email to

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