Suppose I have a random (100,10) matrix. Here’s a code that gives the pca:
rng 'default' X=rand(100,10); X=bsxfun(@minus,X,mean(X)); [coeff,score,latent]=pca(X); covmatrix=cov(X); [V,D]=eig(covmatrix); coeff V dataprincipalspace=X*coeff; score corrcoef(dataprincipalspace); var(dataprincipalspace)' latent sort(diag(D),'descend')
If now I wish to know the intrinsic dimension of it, what should I add to my code? Help is appreciated!
Best Answer