Thread Subject: strange: correlated principal components after orthogonal rotation

Subject: strange: correlated principal components after orthogonal rotation

From: Roland Neumann

Date: 23 Oct, 2008 16:13:02

Message: 1 of 3

I came across a strange behaviour while computing principal components with the Statistics Toolbox (either princomp or pcacov, doesn't matter).

Background is calculating independent software metrics using PCA. This works quite well, when I'm doing like:

EV Lambda =pcacov(corr(M))
...(compute FL out of EV and Lambda)
C= zscore(M)*EV

leads to nicely uncorrelated C (my independent software metrics). Now the strange thing... I want the principal components better suiting the metrics and use orthogonal rotation like varimax or quartimax with:

RotFL = rotatefactors(FL, 'method', 'varimax', 'normalization', 'off')

This is supposed to be (according to help) an orthogonal operation.
But after another:
CRot= zscore(M)*EVRot
I get correlated C.

It's already visible in RotFL: Computing the angles between each 2 column-vektors (A*B/(|A|*|B|) shows no 90? anymore (as for EV and FL).

I'm lost with this supposingly orthogonal rotation and will appreciate any hints. Thank you.

Subject: strange: correlated principal components after orthogonal rotation

From: Roger Stafford

Date: 23 Oct, 2008 17:20:03

Message: 2 of 3

"Roland Neumann" <software-pca@o2online.de> wrote in message <gdq7qd$p1g$1@fred.mathworks.com>...
> I came across a strange behaviour while computing principal components with the Statistics Toolbox (either princomp or pcacov, doesn't matter).
>
> Background is calculating independent software metrics using PCA. This works quite well, when I'm doing like:
>
> EV Lambda =pcacov(corr(M))
> ...(compute FL out of EV and Lambda)
> C= zscore(M)*EV
>
> leads to nicely uncorrelated C (my independent software metrics). Now the strange thing... I want the principal components better suiting the metrics and use orthogonal rotation like varimax or quartimax with:
>
> RotFL = rotatefactors(FL, 'method', 'varimax', 'normalization', 'off')
>
> This is supposed to be (according to help) an orthogonal operation.
> But after another:
> CRot= zscore(M)*EVRot
> I get correlated C.
>
> It's already visible in RotFL: Computing the angles between each 2 column-vektors (A*B/(|A|*|B|) shows no 90? anymore (as for EV and FL).
>
> I'm lost with this supposingly orthogonal rotation and will appreciate any hints. Thank you.
-------
  Roland, just because a pair of random variables, x and y, are uncorrelated doesn't mean that a rotation of them will yield uncorrelated variables. Let E{x} = E{y} = E(x*y) = 0 so that x and y are uncorrelated. Then rotate them to u = a*x+b*y and v = -b*x+a*y where a^2+b^2 = 1. Then their (cross) covariance will be:

 E{u*v} =
 E{(a*x+b*y)*(-b*x+a*y)} =
 (a^2-b^2)*E{x*y) + a*b*(E{x^2}-E{y^2}) =
 a*b*(E{x^2}-E{y^2})

which will not be zero unless x and y have equal variances. Thus the two quantities u and v are not necessarily uncorrelated.

Roger Stafford

Subject: strange: correlated principal components after orthogonal rotation

From: Roland Neumann

Date: 4 Nov, 2008 09:19:01

Message: 3 of 3

Hello Roger,

Thank you for your fast and precise answer. You helped me alot. When I normalized the Eigenvectors with the Square Root of their Eigenvalues and rotated thereafter, I got uncorrelated Principal components. They all had Variance one.

Now I understand the reason because of your proof.

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
pcacov Roland Neumann 23 Oct, 2008 12:15:06
statistics Roland Neumann 23 Oct, 2008 12:15:06
metrics Roland Neumann 23 Oct, 2008 12:15:06
rotatefactors Roland Neumann 23 Oct, 2008 12:15:06
varimax rotation Roland Neumann 23 Oct, 2008 12:15:06
pca Roland Neumann 23 Oct, 2008 12:15:05
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com