# Normalizing the Eigenvalues so their sum is equal to min(n, p)?

If I compute the eigenvalues and eigenvectors using numpy.linalg.eig (from Python), the eigenvalues returned seem to be all over the place. Using, for example, the Iris dataset, the normalized Eigenvalues are [2.9108 0.9212 0.1474 0.0206], but the ones I currently have are [9206.53059607 314.10307292 12.03601935 3.53031167].

The problem I'm facing is that I want to find out how much percentage of the variance each component brings, but with the current Eigenvalues I don't have the right values.

So, how can I transform my eigenvalues so that they can give me the correct proportion of variance?

Edit: Just in case it wasn't clear, I'm computing the eig of the covariance matrix (The process is called Principal Component Analysis).

-
Your question is not quite clear... In particular, the eigenvalues of a matrix are what they are (and it is impossible to know what you mean when you say that "they are all over the place") Reading what you wrote, I cannot tell what it is that you want to know. Something like "how can I transform my eigenvalues so that they can give me the correct proportion of variance" simply do not mean anything to me! –  Mariano Suárez-Alvarez Jan 28 '11 at 4:33
There are four values per line on your dataset. Does that mean they should go into a 2x2 matrix? Such a matrix will have (at most) two eigenvalues. –  Ross Millikan Jan 28 '11 at 17:10
Do you just not need to normalize your eigenvalues so that the sum is equal to one or have I misunderstood? –  user38297 Aug 20 '12 at 12:44

The sum of the eigenvalues equals the trace of the matriz. For a $N \times N$ covariance matriz, this would amount to $N VAR$ - where VAR is the variance of each variable (assuming they are equal - otherwise it would be the mean variance). Put in other way, the mean value of the eigenvalues is equal to the mean value of the variances.

And that's pretty much what can be said. Perhaps you are computing a covariance matriz by just multiplying the data matrices? If so, you just should divide by \$N.

-