필터 지우기
필터 지우기

How do I get proportion of variance?

조회 수: 10 (최근 30일)
Sonisa
Sonisa 2017년 2월 21일
댓글: Sonisa 2017년 2월 24일
I have eight variables and I want to know which one is important and I try to use principal component analysis and the one I get is the percentage? The following is my code and I really need proportion not percentage. Thanks in advance.
[COEFF, latent, explained] = pcacov(cov(out)); proportion = cumsum(latent)/sum(latent); figure pareto(latent)

채택된 답변

Nachiket Katakkar
Nachiket Katakkar 2017년 2월 24일
Your calculation of proportion of variance seems to be correct. The following example highlights that:
% Example from pcacov documentation page
load hald
covx = cov(ingredients);
[COEFF,latent,explained] = pcacov(covx);
cumsum(latent/sum(latent))
ans =
0.8660
0.9789
0.9996
1.0000
pareto(latent)
You will observe that the pareto chart shows only 95% of the cumulative distribution and therefore, 2 columns will be displayed.
Note also that "pcacov" performs principal components analysis on the covariance matrix of the input so calling "cov" inside "pcacov" does not seem necessary.
  댓글 수: 1
Sonisa
Sonisa 2017년 2월 24일
I got it but I was looking for a way to do proportion of variance with respond to the independent variables to the dependent variables. Is there a way?

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

추가 답변 (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