필터 지우기
필터 지우기

Princomp help needed to reduce-change a dimension of the matrix

조회 수: 1 (최근 30일)
Jonny
Jonny 2011년 10월 26일
I have a matrix X 400x500 (rows x column) and I use
[coeff,score,variance]=princomp(X);
%Calculate explained variance
expvar=100*variance/sum(variance);
figure; pareto(expvar);
xlabel('Number of Principal Components');
ylabel('Explained Variance %');
title('Pareto of Explained variance vs. Principal Component Number');
From this figure,I note that the first ten principal components accounts for more that 70% of the total variance
Now, how can I get my new reduced matrix using coeff,score,variance? Please help me,I'm stuck here Thank you

답변 (1개)

bym
bym 2011년 10월 26일
Just use the first 10 values of coeff & score,i.e.
score(:,1:10)

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by