Path: news.mathworks.com!not-for-mail
From: Peter Perkins <Peter.PerkinsRemoveThis@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: eigenvalues of the covarience matrix (princomp)
Date: Thu, 15 Nov 2007 09:18:20 -0500
Organization: The MathWorks, Inc.
Lines: 16
Message-ID: <fhhkfc$9oa$1@fred.mathworks.com>
References: <20207208.1195128945443.JavaMail.jakarta@nitrogen.mathforum.org>
NNTP-Posting-Host: perkinsp.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1195136300 9994 172.31.57.88 (15 Nov 2007 14:18:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 15 Nov 2007 14:18:20 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
In-Reply-To: <20207208.1195128945443.JavaMail.jakarta@nitrogen.mathforum.org>
Xref: news.mathworks.com comp.soft-sys.matlab:437693



yakir gagnon wrote:

> in matlab doing this:
> this: princomp( X/var( X ) ) is: correlation PCA

X/var(X) is not going to get you the right thing for a couple reasons. 
You want either

X ./ repmat(std(X),n,1), or
bsxfun(@rdivide,X,std(X)), or even
X*diag(1./std(X))

> and princomp(zscore( X )) is a CORRECT PCA...

There is absolutely no point in doing this (as opposed to what you've 
called "correlation PCA"), since PRINCOMP already centers the data.