using PCA as feature extraction
显示 更早的评论
I use PCA as a feature extraction tool. in the learning stage I trained the system to choose the best principal component for the training data, for each class(lets say 5 classes ) the system learned for each class what is best principal component to represent the trained data(take the most variance) So I have 5 different principal components(or 5 different sets),So each class will has it's own principal components.
In the testing stage, I think to project the testing data into each principal components, since I have 5 classes which means 5 principal components sets, then I will have 5 feature vector, I will pass those 5 feature vector to classification algorithm one by one, which means I will run the classification 5 times, then I will see what is the best(or maximum) classification result in those 5 classification results, And I will make the decision about. my question is: Is what I do correct?
回答(1 个)
Image Analyst
2015-2-28
0 个投票
I'm not following the numbers, like why everything is 5. Okay, you have 5 classes but why do you think that that means you have 5 principal components? For example, let's say you're classifying faces into race and sex. And you have 2 sexes and 4 races and 1000 faces to be classified. Well, you have 8 classes (4 races x 2 sexes) but you could have dozens of eigenface images, not just 8. Let's say I'm using 20 eigenfaces so for a given face I'd have a vector of 20 weights of those 20 images. Then you need to take those 20 feature vector values and figure out which of the 8 sex/race combinations the image actually is (each class/PC would have 20 weights that define the class). So not everything has to be the same number.
2 个评论
hassan hyt
2015-2-28
编辑:hassan hyt
2015-2-28
Image Analyst
2015-2-28
We still need more clarification. Sometimes when you try to be too general, it's not clear, whereas it will become more clear if you use specific situation. What are the 5 classes and what are the measurements made on each sample? And how many PCs are in each class?
类别
在 帮助中心 和 File 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!