From: Peter Perkins on
On 7/17/2010 11:15 AM, Pierrre Gogin wrote:
> Thanks a lot that looks very much what I’m looking for. I was
> confused because actually the pca is not really necessary to get the
> information I’m looking for. It is sufficient to evaluation the
> main diagonal of the covariance matrix. The princomp command is matlab
> does not much more that that I guess.

PRINCOMP relies on SVD. I would not describe that as "not much more".
The principal component coefficients, i.e., the first output of
PRINCOMP, are certainly not derived just from the diagonal of the cov
matrix, nor are the eigenvalues.

> Only if compute also the second
> output that you might get the input Matrix rotated by the matrix
> containing all eigenvalues. Correct?

No, the rotation matrix, i.e. the PC coefs, contains the eigen
_vectors_. That second output of rotated data is known as the "scores".
From: Pierrre Gogin on
Hi Peter,
So I think your proposal is not solving my questions, because it computes the magnitude of variances and not the eigenvalues of each dimension.
I search a bit more and found, that this questions had be discussed before but without a satisfying result, e.g.:
http://www.mathworks.in/matlabcentral/newsreader/view_thread/156868
or
http://www.mathworks.de/matlabcentral/newsreader/view_thread/148851

All of this people wants the same thing: associating the eigenvalues to their original dataset.
One user proposed to use the first column of u in [u,s,v] = svd(A) (See 2nd link), but these are the singular values not the eigenvalues
From: Peter Perkins on
On 7/17/2010 6:10 PM, Pierrre Gogin wrote:
> I search a bit more and found, that this questions had be discussed
> before but without a satisfying result, e.g.:
> http://www.mathworks.in/matlabcentral/newsreader/view_thread/156868
> or http://www.mathworks.de/matlabcentral/newsreader/view_thread/148851
>
> All of this people wants the same thing: associating the eigenvalues to
> their original dataset.

Pierre, you have not defined what you mean by that. In the output of
PRINCOMP, each eigenvalue corresponds to one of the coordinate axes in
the rotated space. But what does, say, the first eigenvalue correspond
to in the original data? Two answers might be:

1) It doesn't correspond to any one thing. The eigenvalues that
PRINCOMP returns are the eigenvalues of the covariance matrix of the
original data, that's all. There's no correspondence to any particular
variable, because the PCs, and therefore their eigenvalues, are a
rotation of the original space.
2) It corresponds to the linear combination of the original variables
that defines the first PC.

It may be that you want to look at the variances of your original
variables (as I already suggested), or you may want to look at the PC
coefficients (ditto) to try and identify a small subset of the original
variables that accounts for a suitable proportion of the total variance.
But if you are expecting to be able to match eigenvalues to your
original variables, 1:1, I don't know what to say. I may just be
misunderstanding what you're asking.

> One user proposed to use the first column of u
> in [u,s,v] = svd(A) (See 2nd link), but these are the singular values
> not the eigenvalues

I don't see that in either thread. One person in the first thread
decided that what he need to do to _compare two PCA solutions_ was to
try and find a correspondence between PCs in those _two solutions_ by
taking dot products between PCs. In any case, the first column of the
first output of SVD is the dominant left singular vector, which in this
case corresponds to the scores along the first PC. The second output of
SVD is the singular values, which are the sqrts of the eigenvalues of
cov(X). See the code in PRINCOMP.

From: Rob Campbell on
>know, with which percentage each of my three features (vec1,vec2,vec3) from the
>original(!) distribution is contributing to my dataset, without having the prior knowledge
>of how they are build. From the output of Matlab I can’t tell. Does somebody have an
>idea how to get this information?

So you want to know how much each of the original dimensions contributes to a given eigenvector? If you can calculate that then you can you obtain this information across any number of PCs.
From: Philip Mewes on

> So you want to know how much each of the original dimensions contributes to a given eigenvector?

Not exactly. I want to know how much each of my original dimensions contributes to the complete set of dimensions. From a list of sorted(!) eigenvalues I guess I want be able to see it.
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: kmeans error message
Next: variable size inputs/outputs