principal component analysis for dimensionality reduction

4 次查看(过去 30 天)
My dataset has 22 features with large no.of samples. I want to reduce it to 10 features by using principal component analysis. The features want to be optimal. Matlab has function for this. But I didn't get clear picture of how to use it. Please somebody help.

回答(1 个)

Image Analyst
Image Analyst 2020-2-1
编辑:Image Analyst 2020-2-1
You can use pca() if you have the Statistics and Machine Learning Toolbox. Did you try it? Basically you put your data in as a matrix with each of the 22 variables being a column, and your observations/measurements being the rows. For example row 9 has all the 22 measurements for sample/observation/test set #9, and so on. Then you'll get 22 PCs where each row of output has the PC weights for those 22 PCs. There are fancy ways, like Eigenvector's PLS toolbox where you can examine the data to try to figure out which of those 22 PC are the most relevant (strongest).
I've attached a PCA example where I used PCA to find the PCs of a collection of separate values (x, y, and z locations):
00_Screenshot.png
along with another, different example where I take the PCs of an RGB image:
01_Screenshot.png

类别

Help CenterFile Exchange 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by