Determining the number of principal components
4 ビュー (過去 30 日間)
古いコメントを表示
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');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/566989/image.png)
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.
0 件のコメント
回答 (1 件)
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!
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!