[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unnormalized covariances
From: |
Jason Stover |
Subject: |
Re: unnormalized covariances |
Date: |
Sun, 7 Mar 2010 18:04:24 -0500 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
You are right. For the double pass, we should just call
cm_to_gsl (cov).
On Sat, Mar 06, 2010 at 08:34:39PM +0000, John Darrington wrote:
> On Thu, Mar 04, 2010 at 05:37:47PM -0500, Jason Stover wrote:
> I need to use the "un-normalized" covariances for the
> regression, meaning just dot products, not divided by
> sample sizes. Does anyone mind if I add the following functions
> to covariance.c?
>
> static const gsl_matrix *
> covariance_calculate_double_pass_unnormalized (struct covariance *cov)
> {
> size_t i, j;
> for (i = 0 ; i < cov->dim; ++i)
> {
> for (j = 0 ; j < cov->dim; ++j)
> {
> int idx;
> double *x = gsl_matrix_ptr (cov->moments[MOMENT_VARIANCE], i, j);
>
> idx = cm_idx (cov, i, j);
> if ( idx >= 0)
> {
> x = &cov->cm [idx];
> }
> }
> }
>
> So far as I can see, this code has no effect.
>
>
> We need to be very clear about what exactly the function
> const gsl_matrix *covariance_moments (const struct covariance *cov, int m);
>
> is returning. Otherwise a lot of other things will break.
>
> Perhaps we should have a different function to return non-normalised moments.
>
> --
> 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.
>
>