[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: Principle component analysis

**From**: |
Oguz Yarimtepe |

**Subject**: |
Re: Principle component analysis |

**Date**: |
Thu, 16 Apr 2009 18:36:16 +0300 |

On Thu, 2009-04-16 at 09:24 -0600, E. Joshua Rigler wrote:
>* My guess is that the graphic you linked to is a plot of the first*
>* column of the second output argument to princomp.m (i.e., the*
>* "transformed data"). Either call princomp.m with a second output*
>* argument, or multiply the demeaned input matrix by the principal*
>* component matrix. (e.g.,*
>* *
>* >> pc = princomp(obs_matrix);*
>* >> xform_matrix = center(obs_matrix)*pc;*
>* *
>* This is exactly what princomp.m does to get the transformed data.*
I downloaded the princomp.m from svn and here is what i got:
test princomp.m
***** test
x=[1,2,3;2,1,3]';
[pc,z,w,Tsq]=princomp(x);
m=[sqrt(2),sqrt(2);sqrt(2),-sqrt(2);-2*sqrt(2),0]/2;
m(:,1) = m(:,1)*sign(pc(1,1));
m(:,2) = m(:,2)*sign(pc(1,2));
!!!!! test failed
error: `zscore' undefined near line 20 column 29
I am using the octave3.0 from the Ubuntu repo. Should i checkout from
svn and install it?
--
Oguz Yarimtepe
http://www.loopbacking.info