Re: nnz in convariance of a sparse matrix



H. S. <g_reate_xcalibur@xxxxxxxxx> wrote:
> Apparently, _Hiu Chung Law_, on 05/03/2005 01:59 PM,typed:

>>
>> What is the use of the covariance matrix? If, for example, you want
>> to find the eigenvectors of the covariance matrix, you do not need to
>> form A' A explicitly.
>>

> Yes, I am trying to find eigenvectors of the covariance matrix. To be
> more precide, I am trying to find eigenvectors of (I-A)'(I-A) where I is
> an identity matrix, A is a square sparse matrix and X' denotes transpose
> of matrix X. Could you elaborate on your comment above?

> thanks,
> ->HS

> --
> (Remove all underscores,if any, from my email address to get the correct
> one. Apologies for the inconvenience but this is to reduce spam.)

You should use an eigen-solver which uses a function for matrix multiplication.
Let M = (I-A)'(I-A). Instead of forming M explicitly, you can write a function
which computes M x for any vector x. In other words,

function y = fun(x,A)
y = (I-A) * x ;
y = (I-A)' * y ;
return;

Note that the multiplication is fast because I-A is a sparse matrix.

Some eigensolvers allow you to specify the function "fun" instead
of the matrix M. For example, the matlab command "eigs" allows you to
do this.

The simplest way to find eigenvectors which uses only matrix
multiplication is the power method, assuming that the largest
eigenvalue of M is simple.

Alternatively, you can check out various versions of Lanczos method.

.



Relevant Pages

  • Re: Covariance Mean subtraction in Principal Component Analysis
    ... >>> previously subtracting the mean. ... >> to the eigenvectors of the covariance matrix, ... >> of signals, like images. ...
    (comp.soft-sys.matlab)
  • Re: The use of PCA on a 64x64 Matrix
    ... > value of the pixels. ... and finding the mean for each column vector. ... the covariance matrix is 4096 x 4096. ... I then calculated the eigenvectors ...
    (comp.graphics.algorithms)
  • Principal Components Analysis
    ... sample on which I have pre and post observations, ... whether I should use the correlation matrix or the covariance matrix. ... When I use the correlation matrix, the 'pre' eigenvectors are ...
    (sci.stat.math)
  • Re: random gaussian cloud
    ... The following is a general solution to the problem the original poster ... diagonalise the covariance matrix. ... the distribution it represents aligns with the Cartesian axes; ... eigenvalues and the eigenvectors ...
    (sci.stat.math)
  • Re: Understanding Eigenvalues and Eigenvectors
    ... Are you the same Ross-C that I've just gone through giving a detailed ... > me to find the eigenvectors and eigenvectors of a matrix. ... > What I can't understand is the jump from there to something like PCA. ... The covariance matrix of the normalized data would ...
    (sci.stat.math)