[patch #6568] Computation of the covariance matrix

View: New views
5 Messages — Rating Filter:   Alert me  

[patch #6568] Computation of the covariance matrix

by Alexander Shulgin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


URL:
  <http://savannah.gnu.org/patch/?6568>

                 Summary: Computation of the covariance matrix
                 Project: PSPP
            Submitted by: jstover
            Submitted on: Sunday 07/13/2008 at 21:24
                Category: None
              Item Group: None
                  Status: Ready For Test/Review
             Assigned to: None
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

The attached patch contains an initial version of code to compute the
covariance matrix for a data set. This will be necessary to allow any linear
regression code to run without storing the entire data set in memory.

This code requires two data passes. Later I intend to add code for one data
pass.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sunday 07/13/2008 at 21:24  Name: covariance-matrix.patch  Size: 8kB  
By: jstover

<http://savannah.gnu.org/patch/download.php?file_id=16118>

    _______________________________________________________

Reply to this item at:

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

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



_______________________________________________
pspp-dev mailing list
pspp-dev@...
http://lists.gnu.org/mailman/listinfo/pspp-dev

[patch #6568] Computation of the covariance matrix

by Alexander Shulgin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of patch #6568 (project pspp):

             Assigned to:                    None => jstover                

    _______________________________________________________

Follow-up Comment #1:

It seems somewhat pointless to have covariance-matrix.h contain nothing
except to include another header file.  Multiple inclusions do nothing except
make compilation slower.  Shouldn't it contain the prototypes of the
functions?

covariance_update_categorical_numeric and covariance_pass_one take a number
of arguments which probably should be const.

    _______________________________________________________

Reply to this item at:

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

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



_______________________________________________
pspp-dev mailing list
pspp-dev@...
http://lists.gnu.org/mailman/listinfo/pspp-dev

[patch #6568] Computation of the covariance matrix

by Alexander Shulgin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #2, patch #6568 (project pspp):

"It seems somewhat pointless to have covariance-matrix.h contain nothing
except to include another header file. Multiple inclusions do nothing except
make compilation slower. Shouldn't it contain the prototypes of the
functions?"

Oops. I just forgot to add the prototypes. Currently, this is only the
initial version of covariance-matrix.c. I will add a one-pass algorithm later
and some acessor functions. For now I was just making sure the idea behind
this file was sound. (And making sure others could compile it.)

"covariance_update_categorical_numeric and covariance_pass_one take a number
of arguments which probably should be const."

So noted. I'll make them const.


    _______________________________________________________

Reply to this item at:

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

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



_______________________________________________
pspp-dev mailing list
pspp-dev@...
http://lists.gnu.org/mailman/listinfo/pspp-dev

[patch #6568] Computation of the covariance matrix

by Alexander Shulgin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of patch #6568 (project pspp):

                  Status:   Ready For Test/Review => Done                  
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #3:

I added the changes John suggested and pushed the patch.


    _______________________________________________________

Reply to this item at:

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

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



_______________________________________________
pspp-dev mailing list
pspp-dev@...
http://lists.gnu.org/mailman/listinfo/pspp-dev

Re: [patch #6568] Computation of the covariance matrix

by John Darrington :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jul 15, 2008 at 03:13:32PM +0000, Jason H Stover wrote:

      For now I was just making sure the idea behind
     this file was sound. (And making sure others could compile it.)


When I compile it, the compiler warns me that:
     
 src/math/covariance-matrix.c: In function 'covariance_pass_one':
 src/math/covariance-matrix.c:107: warning: 'x' is used uninitialized

and indeed it would seem to be correct.

J'

--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.




_______________________________________________
pspp-dev mailing list
pspp-dev@...
http://lists.gnu.org/mailman/listinfo/pspp-dev

signature.asc (196 bytes) Download Attachment
LightInTheBox - Buy quality products at wholesale price