Determining the number of principal components
5 次查看(过去 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');
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Eigenvalues 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!