Cross validation in Support vector machine (SVM).

1 visualizzazione (ultimi 30 giorni)
Max
Max il 27 Gen 2015
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 ?

Risposte (0)

Categorie

Scopri di più su Downloads in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by