How to related PCA output to the original data?

조회 수: 17 (최근 30일)
Yaser Khojah
Yaser Khojah 2019년 4월 18일
댓글: Paul Gershon 2023년 11월 20일
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
  댓글 수: 16
Paul Gershon
Paul Gershon 2023년 11월 20일
Is the answer to square all numbers in the coeff matrix and then do the division for relative contribution? For example:
PC1 PC2
var1: -2 0.3
var2: 5 3.8
Square it:
PC1 PC2
var1: 4 0.09
var2: 25 14.4
Now relative contribution of var2 to PC1 = 25/4? or is it 25/29? (the denominator is the sum for the column)?
Thanks!
Paul Gershon
Paul Gershon 2023년 11월 20일
..Or is the answer not to square the coefficients, but simply to take absolute values because sign simply shows whether the point is pushed negative on the PC axis by the sign of the coefficient, but the sign is irrelevant to magnitude of contribution?
Thanks!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by