MATLAB: How to classify PCA features using SVM

svm for pca

I have done face recognition using PCA ( It was recognizing the face by using the min euclidean distance between the train and the query image got an accuracy of around 85%). Now i want do that using SVM. Actually SVM shows 100% result on training images but its not working properly on test samples. I am not getting where the problem is.. Help me in solving this problem..

Best Answer

One problem is related to the overfitting. To avoid this, you should test with different level of the Soft-margin. In this guide you are going to find how to improve the overfitting: http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf
After you study the guide, if you need more help, you can go to this series of videos where you can learn how to perform SVM, then how to select the best K-Fold.
The videos are made in Mandarin but you could learn from them just following the process.
1. How to use SVM: https://www.youtube.com/watch?v=4GB5HVw0CuM
2.Determine the Best Parameters via K-fold Crossvalidation https://www.youtube.com/watch?v=MyywXRLuABg
Related Question