Asked by Yaser Khojah
on 18 Apr 2019

Hello,

I'm new to PCA and I would like to learn the outcome of pca function. I have read the document and checked others works but I'm a bit confused on how to related the results (wcoeff, latent, explained) to the original data. For example, I'm using the example from the document as below. I understand the (wcoeff) presents the eigenvector vectors. the (latent) presents the eigenvalues. the (explained) is the percentage of the total variance explained by each principal component. NOW, how are all these information are related to the main data which is the ingredients here? how do I know from looking at the results in (explained) that the 55 % is related to which variables or columns in the ingredients matrix?

load hald

[wcoeff,~,latent,~,exp

lained] = pca(ingredients,'VariableWeights','variance')

wcoeff = 4×4

-2.7998 2.9940 -3.9736 1.4180

-8.7743 -6.4411 4.8927 9.9863

2.5240 -3.8749 -4.0845 1.7196

9.1714 7.5529 3.2710 11.3273

latent = 4×1

2.2357

1.5761

0.1866

0.0016

explained = 4×1

55.8926

39.4017

4.6652

0.0406

Opportunities for recent engineering grads.

Apply Today
## 12 Comments

## Adam (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/457161-how-to-related-pca-output-to-the-original-data#comment_695591

## Yaser Khojah (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/457161-how-to-related-pca-output-to-the-original-data#comment_695630

## Adam (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/457161-how-to-related-pca-output-to-the-original-data#comment_695631

## Yaser Khojah (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/457161-how-to-related-pca-output-to-the-original-data#comment_695633

## Adam (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/457161-how-to-related-pca-output-to-the-original-data#comment_695641

## Yaser Khojah (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/457161-how-to-related-pca-output-to-the-original-data#comment_695649

## Adam (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/457161-how-to-related-pca-output-to-the-original-data#comment_697147

## Gabrielle Hedrick (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/457161-how-to-related-pca-output-to-the-original-data#comment_738412

## Adam (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/457161-how-to-related-pca-output-to-the-original-data#comment_739365

## Gabrielle Hedrick (view profile)

## Direct link to this comment

https://fr.mathworks.com/matlabcentral/answers/457161-how-to-related-pca-output-to-the-original-data#comment_739468

## As Has (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/457161-how-to-related-pca-output-to-the-original-data#comment_747368

## Adam (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/457161-how-to-related-pca-output-to-the-original-data#comment_747371

Sign in to comment.