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!