[Top][All Lists]

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

[patch #6650] one pass covariance algorithm

From: John Darrington
Subject: [patch #6650] one pass covariance algorithm
Date: Thu, 30 Oct 2008 00:08:15 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080612 Iceweasel/ (Debian-

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

I haven't tested it, but it's looking good.  Some minor points:

1. In order to implement commands' /MISSING subcommand, I think it may be
necessary to replace MV_ANY with a variable passed to the constructor.

2. This code:     
          if (var_is_alpha (v_variables[i]))
              cat_value_update (v_variables[i], val1);
              update_moments (cov, i, val1->f);
  sits inside a loop within covariance_accumulate, which typically will be
inside another loop. Both update_moments and cat_value_update both perform a
test, which is invariant to both loops.  That's a lot of unnecessary tests. So
it will improve performance (and readability) if this is replaced with a
single line: cov->update (cov, i, val1); and the value of update can be set in
the constructor.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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