[COEFF,SCORE] = princomp(X); Why is SCORE != X * COEFF ???

1 view (last 30 days)
Hi All,
I'm using PCA.
[COEFF,SCORE] = princomp(X);
My understanding of the help is that the COEFF matrix can be used to transform the inputs stand alone. However I am finding that
SCORE != X * COEFF
Any ideas?

Answers (1)

Peter Perkins
Peter Perkins on 21 Aug 2012
Hi Stewart -
You forgot to center the data first: "princomp centers X by subtracting off column means".
Hope this helps.
  1 Comment
Stewart Charles
Stewart Charles on 21 Aug 2012
Many thanks. You are right. I need to also adjust for the constant in the transform!

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!