matlab - Principal Component Analysis? -


i strugling pca stuff.

so example have :

data=100*3 substractdata=data-mean (the size same 100*3) covariance=3*3 eigenvector=3*3 eigenvalue=3*3 

and reduction our data, have eliminate number of eigen value , eigen vector based on k

for example k=2

so number of

  • eigenvalue become 2*2
  • eigenvector = 2*2

1st ques: right?

and have project out matrix

project=eigenvector (which 2*2) *substractdata (100*3) 

2nd ques: how can calculate this, because size of eigenvalue , substractdata different?

and question,

3rd ques: if want use reduction data should use project?

4th ques: if want show principal components (which first , second columns of eigen vector), have plot principal components along data (initial data) or substractdata?

your eigenvalue 3*3 matrix diagonal matrix. eigenvalues scalars along diagonal. reduce dimensionality pick k=2 eigenvectors correspond 2 largest eigenvalues. need sort eigenvectors based on corresponding eigenvalues , pick 2 have 2 largest eigenvalues.

so have eigenvalue = 2*2 (only 2 eigenvalues) , eigenvector 3*2 after reduction.

since eigenvectors 3*2 can project data onto 2-dim subspace using substractdata * eigenvector. need add mean after reconstruction show data along principal components.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -