Determining the number of principal components

조회 수: 6 (최근 30일)
Serra Aksoy
Serra Aksoy 2021년 3월 29일
답변: Mahesh Taparia 2021년 4월 2일
Hi everyone,
I applied svd method to my matrix as a dimensionality reduction method.
My main aim is to get higher classification rate.
%Singular value decomposition of X;
[U, Sig, V]=svd(X);
sv=diag(Sig)
%for the distribution of singular values;
figure;
sv=sv/sum(sv);
stairs(cumsum(sv));
xlabel('singular values');
ylabel('cumulative sum');
So my question here is that how can i determine the number of singular values that i should take for creating a new data for classification?
As i understand from the above figure i have to take approximately 250 singular values that it counts for 95% of my data.
So should I take first 250 singular values for creating a new data for classification? How can i interpret the figure above?
Thanks in advance.

답변 (1개)

Mahesh Taparia
Mahesh Taparia 2021년 4월 2일
Hi
The function svd returns the singular values in descending order, so you can consider first N values. Regarding the consideration of number (N) of singular values, it depends upon the application. Usually the singular values are considered with cumulative variance of >90%. So you can experiment with the trained classification model by varying the number of singular values and check the model accuracy. You can select the number of values where the accuracy is converging or the accuracy reached the desired values.
Hope it will help!

카테고리

Help CenterFile Exchange에서 Eigenvalues에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by