Determining the number of principal components
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Mahesh Taparia
el 2 de Abr. de 2021
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 comentarios
Ver también
Categorías
Más información sobre Eigenvalues en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!