Thread Subject:
Eigen decomposition of sum of two very large covariance matrices

Subject: Eigen decomposition of sum of two very large covariance matrices

From: Amanmeet

Date: 1 Jun, 2012 22:16:20

Message: 1 of 5

Hi,
I want to find the eigen decomposition of the sum of two covariance matrices. the problem is that the covariance matrices are of the size ( 1.6 million x 1.6 million ) .

I have not been able to find a method to avoid finding these huge covariance matrices and then computing the eigen decomposition.

A1 = matrix of size ( 1.6 Million x 30 ) and
A2 = matrix of size ( 1.6 Million x 30 )

Find Eigen decomposition of ( A1A1' + A2A2' ) ...

Any help is much appreciated.

Regards
Amanmeet Garg

Subject: Eigen decomposition of sum of two very large covariance matrices

From: Bruno Luong

Date: 1 Jun, 2012 23:50:14

Message: 2 of 5

"Amanmeet " <aman1986@gmail.com> wrote in message <jqbevk$a6i$1@newscl01ah.mathworks.com>...
> Hi,
> I want to find the eigen decomposition of the sum of two covariance matrices. the problem is that the covariance matrices are of the size ( 1.6 million x 1.6 million ) .
>
> I have not been able to find a method to avoid finding these huge covariance matrices and then computing the eigen decomposition.
>
> A1 = matrix of size ( 1.6 Million x 30 ) and
> A2 = matrix of size ( 1.6 Million x 30 )
>
> Find Eigen decomposition of ( A1A1' + A2A2' ) ...
>

p = size(A1,2); % 30
q = size(A1,2); % 30
[Q R]=qr([A1 A2],0);
R1 = R(:,1:p);
R2 = R(:,p+(1:q));

B = R1*R1'+R2*R2'; % 60 x 60
[W D] = eig(B);
V = Q*W;

% Now you have the eigen decompositions of A :=A1*A1'+A2*A2', i.e. A*V = V*D;

% Bruno

Subject: Eigen decomposition of sum of two very large covariance matrices

From: Amanmeet

Date: 7 Jun, 2012 22:41:14

Message: 3 of 5

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <jqbkfm$1lr$1@newscl01ah.mathworks.com>...
> "Amanmeet " <aman1986@gmail.com> wrote in message <jqbevk$a6i$1@newscl01ah.mathworks.com>...
> > Hi,
> > I want to find the eigen decomposition of the sum of two covariance matrices. the problem is that the covariance matrices are of the size ( 1.6 million x 1.6 million ) .
> >
> > I have not been able to find a method to avoid finding these huge covariance matrices and then computing the eigen decomposition.
> >
> > A1 = matrix of size ( 1.6 Million x 30 ) and
> > A2 = matrix of size ( 1.6 Million x 30 )
> >
> > Find Eigen decomposition of ( A1A1' + A2A2' ) ...
> >
>
> p = size(A1,2); % 30
> q = size(A1,2); % 30
> [Q R]=qr([A1 A2],0);
> R1 = R(:,1:p);
> R2 = R(:,p+(1:q));
>
> B = R1*R1'+R2*R2'; % 60 x 60
> [W D] = eig(B);
> V = Q*W;
>
> % Now you have the eigen decompositions of A :=A1*A1'+A2*A2', i.e. A*V = V*D;
>
> % Bruno

Hi Bruno,
 To my amazement there is a difference in the calculation of the QR decomposition with the two function calls.
[Q R]=qr([A1 A2],0);

[Q R]=qr([A1 A2]);

the one that adds an 0 as a parameter is the economy sized version, and only calculates the eigenvectors till the rank of the matrix.

where as the one without the parameter tries and does the full eigendecomposition and then you choose the first few eigenvectors for the non zero eigenvalues.

I could not find a reason for the eigenvectors in the two cases to be different.
Is there an alternate solution ? OR a possible explanation for this ?

Regards
Aman

Subject: Eigen decomposition of sum of two very large covariance matrices

From: Bruno Luong

Date: 7 Jun, 2012 23:06:09

Message: 4 of 5

"Amanmeet " <aman1986@gmail.com> wrote in message <jqrama$7m6$1@newscl01ah.mathworks.com>...

>
> I could not find a reason for the eigenvectors in the two cases to be different.
> Is there an alternate solution ? OR a possible explanation for this ?

qr decomposition (without permutation) is not unique if the columns are dependent.

Bruno

Subject: Eigen decomposition of sum of two very large covariance matrices

From: Amanmeet Garg

Date: 8 Jun, 2012 00:33:18

Message: 5 of 5

Hi Bruno,
 Thank you for the explanation. It helps.

Regards
Aman

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
eeigen decompositi... Amanmeet Garg 1 Jun, 2012 18:19:10
covariance Amanmeet Garg 1 Jun, 2012 18:19:10
large covariance Amanmeet Garg 1 Jun, 2012 18:19:10
rssFeed for this Thread

Contact us