- #1

confused_engineer

- 39

- 2

- TL;DR Summary
- I cannot calculate the random variables associated to the eigenfuctions of the principal component analysis.

Hello.

I have designed a Gaussian kernel as:

[X,Y] = meshgrid(0:0.002:1,0:0.002:1);

Z=exp((-1)*abs(X-Y));

Now, I calculate PCA:

[coeffG, scoreG, latentG, tsquaredG, explainedG, muG]=pca(Z, 'Centered',false);

I can rebuid the original data propperly as defined in the dcumentation https://la.mathworks.com/help/stats/pca.html#bth9ibe-coeff:

Zrec=scoreG*coeffG';

Now, I wish to calculate the uncorrelated random variables which acompany the eigenvectors, columns of scoreG. For that, I do the following:

randvarG=Z*scoreG(:,1); However, the resulting histogram of randvarG does not look gaussian at all.

Any hindsight on what I am doing wrong is very appreciated.

Thanks for reading

I have designed a Gaussian kernel as:

[X,Y] = meshgrid(0:0.002:1,0:0.002:1);

Z=exp((-1)*abs(X-Y));

Now, I calculate PCA:

[coeffG, scoreG, latentG, tsquaredG, explainedG, muG]=pca(Z, 'Centered',false);

I can rebuid the original data propperly as defined in the dcumentation https://la.mathworks.com/help/stats/pca.html#bth9ibe-coeff:

Zrec=scoreG*coeffG';

Now, I wish to calculate the uncorrelated random variables which acompany the eigenvectors, columns of scoreG. For that, I do the following:

randvarG=Z*scoreG(:,1); However, the resulting histogram of randvarG does not look gaussian at all.

Any hindsight on what I am doing wrong is very appreciated.

Thanks for reading