1

We need to find eigen vectors using PCA. We are using princomp ( matrix ). Which gives principal component co-efficient, transformed data and eigen values.

For below data :

2.5 2.4
0.5 0.7
2.2 2.9
1.9 2.2
3.1 3
2.3 2.7
2   1.6
1   1.1
1.5 1.6
1.1 0.9



function PCAFinder(filein)
    X = csvread(filein);

    [pc,score,latent] = princomp(X);

    pc
    transpose(pc)

end

Principal component co-efficient returned by above code (pc)

0.6779    0.7352
0.7352   -0.6779

Actual Eigen vector to be produced :

   -0.7352    -0.6779
    0.6779   -0.7352

How to get the above eigen vectors

Lohith
  • 11
  • 1
  • If you feel I have answered your question then it is good practice to mark the question answered by clicking the tick mark next to my answer. Thanks. – Colin T Bowers Feb 03 '14 at 09:13

1 Answers1

1

The principal component co-efficient returned is a valid eigenvector matrix of the covariance matrix of your data. Eigenvectors are unique only up to an orthogonal transformation. For a more detailed discussion see my answer to an older SO question here.

In this particular case, the appropriate orthogonal transformation to obtain exact equality between your matrices is to multiply your PC coefficient matrix by: [0 1; -1 0]

Community
  • 1
  • 1
Colin T Bowers
  • 18,106
  • 8
  • 61
  • 89