**What tools did jolliffe give us (that i could confirm)?**

- Z = X A, A orthogonal, X old data variables in columns
- serious rounding
- plot data wrt first two PCs
- how many variables to keep?

but jolliffe would have used the correlation matrix. Before we do anything else, **let’s get the correlation matrix for davis’ example.** Recall the centered data X:

i compute its correlation matrix:

Now get an eigendecomposition of the correlation matrix; i called the eigenvalues and the eigenvector matrix A. Here’s A:

If we compute and get an identity matrix, then A is orthogonal. (it is.)

the eigenvalues are:

That the third eigenvalue is zero would tell us, if we didn’t already know it from davis, that the data, X, is 2D.

**now we can get (1) the new data Z, wrt the orthogonal eigenvector matrix A**; it is given by the projection of X onto A (because A is orthogonal, i.e. the basis vectors are orthonormal):

Fascinating.

An understatement. There are 3 nonzero columns.

in sharp contrast to from the centered data X, this new data does not look 2D wrt the orthogonal eigenvector basis. It is still 2D, nothing changed about that, but it isn’t at all clear from the new components of the data. our 3 columns are not linearly independent.

i just gave us all a beautiful lesson: **it can be very worthwhile to look at both covariance (or of centered data) and correlation.**

BTW, since this is new data, get the variances…

and the total is… 32. we remember that number from davis.

Sure enough, the orthogonal eigenvector matrix A has redistributed the total variance, which is 32 – but it has spread it out over 3 variables instead of 2.

Now we are ready to follow jolliffe. BTW, i will refer to things like “jolliffe’s Z” although jolliffe, of course, never worked out davis’ example! **we could try (2) some serious rounding of everything in sight.** The correlation matrix: original…

rounded to the nearest .5…

The eigenvector matrix? original…

rounded to the nearest .5…

The new data? original…

Rounded to the nearest .5 …

Rounded to the nearest 1…

i don’t see anything exciting in all that. (but if you’re thinking that i haven’t looked at everything in sight, you’re right. My bad. I’ll make it right. Soon. Very soon.)

**As for (3) a plot of the data wrt the first two PCs**, that should be: take the first two columns of the new data…

and plot those pairs of points. (this corresponds to davis’ plotting .)

That looks remarkably like a plot of my (mine or davis’ doesn’t matter much, but there are sign differences; nevertheless, the geometry was memorable.) here’s a plot of my :

Clearly we need to look at rounded and Z, and A and v. (i said i’d make it right.) here are jolliffe’s Z …

and my , rounded to the nearest .2 …

The first two columns are not identical, but awfully close, and everything else is identical (to within the usual sign ambiguity).

here are jolliffe’s A …

and my v…

i am surprised at how similar these are. This will not always happen. After all, we saw, in jolliffe when he worked both the correlation and the covariance matrices, that the eigenvectors need not be that similar.

Moving on to (4), **how many new variables would jolliffe tell us to keep?** recall the eigenvalues of the correlation matrix…

If we keep only those greater than 1 or even those greater than .7, we would keep only one.

Write them as percentages of total…

If we keep those whose cumulative contribution is 70 – 90%, we would keep only one.

a scree graph won’t help at all: we only have two nonzero eigenvalues, so we get a single line segment, and no “elbow” is possible.

What about the broken stick model? recall that if a stick of length 1 is broken into p pieces, then the expected length of the kth largest piece is given by

The expected lengths for a unit stick broken into 3 pieces are…

i.e.

and our fractional eigenvalues were

So, once more, jolliffe would keep only one eigenvector (.8 > .61 but .2 < .278).

Jolliffe notwithstanding, i would keep both nonzero eigenvalues. it just doesn’t seem excessive.

April 28, 2008 at 12:42 pm

[…] an eigendecomposition of the correlation matrix did not lead to new data that was manifestly 2D. (here) In a sense the correlation matrix was not as effective at showing the 2D dimensionality of the data […]

April 28, 2008 at 5:14 pm

well, well, well.

my own link labeled “(here)” to this post, in “preprocessing”, generated an automatic comment; it therefore provides a link to the calling post.

i just thought i would remark on this phenomenon.

rip