Re: Generalized eigenvector problem
- From: "Roger Stafford" <ellieandrogerxyzzy@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 4 Apr 2008 04:57:01 +0000 (UTC)
Luca <lucazapp@xxxxxxxxxxx> wrote in message
<25081522.1207238002409.JavaMail.jakarta@xxxxxxxxxxxxxxxxxxxxxx>...
Hello,on a paper where they reach the equation
I've been struggling with this problem during the last two days. I'm working
the element D(i,i) is equal to the sum of the values on the row "i" of the
( D - W ) y = Lambda D y
where W is a positive matrix and D is a diagonal matrix where the value of
matrix W.
eigenvalue system. And they also prove that this system is equivalent to the
They say that this system can be solved by solving the generalized
following:
problem and they all (almost) give different solutions so I wonder which is the
D^(-1/2) ( D - W ) D^(-1/2) z = Lambda z
where z = D^(1/2) y
The point is that I found at least 5 different versions for solving the
good one?
--------
I attach the code with the four methods so that you can have a look.
Thank you for any help.
Luca
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clc
W = [1 2 3; 4 5 6; 7 3 9];
d=sum(W,2);
D=diag(d);
% compute the pseudo inverse. This would be useful
% if d has zero values which anyway is not the case
disp('Pseudo Inverse way ');
ind = find(d > 0.0001);
q = zeros(1, length(d));
q(ind) = 1./sqrt(d(ind));
D2 = diag(q);
[U, S, V] = svd(D2*(D-W)*D2)
% svd first
disp('svd first ');
D2 = diag(d.^(-1/2));
[U, S, V] = svd(D2*(D-W)*D2)
% svd second
disp('svd Second');
D2 = diag(sqrt(d));
[U, S, V] = svd(D2*(D-W)*D2)
% svd third
disp('svd third');
D2 = 1./sqrt(diag(d)+eps);
[U, S, V] = svd(D2*(D-W)*D2)
% Eig
disp('eig');
[U, S] = eig(D-W, D, 'qz')
Luca, why are you using the singular value decomposition function, 'svd', to
find the eigenvectors and eigenvalues for the matrix
M = D^(-1/2)*(D-W)*D^(-1/2) ?
M, as you have defined it, is not necessarily symmetric, and therefore does
not give the same values for 'svd' as it does for 'eig'. You need to be
comparing the values of [v,d] = eig(M) with those of [v,d] = eig(D-W,D),
bearing in mind that they are related by z = D^(1/2)*y. The corresponding
eigenvalues should be the same, but only a proportionality can be established
between the z eigenvectors and D^(-1/2)*y of the y eigenvectors. (Also keep
in mind that the generalized eigenvectors will not be normalized.) As you are
aware, if a solution y has been found, then any multiple of y is also a solution
to your original equations.
Also in your "svd second" case it looks as though you used the wrong value
for D2.
Roger Stafford
.
- Follow-Ups:
- Re: Generalized eigenvector problem
- From: Luca
- Re: Generalized eigenvector problem
- From: Roger Stafford
- Re: Generalized eigenvector problem
- References:
- Generalized eigenvector problem
- From: Luca
- Generalized eigenvector problem
- Prev by Date: Re: processing image in a specific region
- Next by Date: Re: Generalized eigenvector problem
- Previous by thread: Generalized eigenvector problem
- Next by thread: Re: Generalized eigenvector problem
- Index(es):
Relevant Pages
|