Re: nnz in convariance of a sparse matrix
- From: Hiu Chung Law <antispam@xxxxxxxxxxxx>
- Date: 4 May 2005 15:34:00 GMT
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.
.
- Follow-Ups:
- Re: nnz in convariance of a sparse matrix
- From: H. S.
- Re: nnz in convariance of a sparse matrix
- References:
- nnz in convariance of a sparse matrix
- From: H. S.
- Re: nnz in convariance of a sparse matrix
- From: Hiu Chung Law
- Re: nnz in convariance of a sparse matrix
- From: H. S.
- nnz in convariance of a sparse matrix
- Prev by Date: Re: Shortening Eigenvectors
- Next by Date: Convergence, Mulitple Eigenvalues by simple Lanczos algorithm
- Previous by thread: Re: nnz in convariance of a sparse matrix
- Next by thread: Re: nnz in convariance of a sparse matrix
- Index(es):
Relevant Pages
|