Cross validation in Support vector machine (SVM).

2 views (last 30 days)
Hello all,
I am trying to find out of sample mis-classification for my SVM model using by using:
CVSVMModel1 = crossval(SVMModel1);
misclass1 = kfoldLoss(CVSVMModel1);
This is from the link
http://www.mathworks.com/help/stats/support-vector-machines-svm.html#bsr5o09
However, I keep getting error as below:
Error using crossval (line 160)
At least two inputs are needed.
Since I just simply copied the codes from the link above, I assume the problem is perhaps due to MATLAB version! There was other errors that I had to use "svmtrain" instead of "fitcsvm". My MATLAB version is 2013b. Has anybody encountered similar problem? Could anybody give me a hint how to cross validate and finally get the out-of-sample mis-classification rate (please refer to the link above) on the trained ?

Answers (0)

Categories

Find more on Downloads in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!