Re: PrincipalComponents
- To: mathgroup at smc.vnet.net
- Subject: [mg63735] Re: PrincipalComponents
- From: Antti Penttilä <Antti.I.Penttila at helsinki.fi.invalid>
- Date: Thu, 12 Jan 2006 04:09:28 -0500 (EST)
- Organization: University of Helsinki
- References: <dq2rk5$n21$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Scott wrote:
> Anybody know how to ask PrincipalComponents to give you back the
> transformation it applied to the data; i.e. the principal components?
>
> Cheers, Scott
>
The principal components are based on the eigensystem of the covariance
matrix of data. The transformation for data matrix X is:
C = CovarianceMatrix[X]
m = Mean[X]
{val, B} = EigenSystem[C]
princComp = Transpose[B . (m-Transpose[X])]
Best regards,
Antti Penttilä