Cross validation in Support vector machine (SVM).

2 次查看(过去 30 天)
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 ?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Downloads 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by