How to use predict function in matlab to test mutli-class SVM -


i want implement 10 fold cross-validation in multi-class svm using matlab built-in functions. i've used code this answer , replaced training function svmtrain , testing part following code:

for j=1: size(testdata,1)   found=0;   k=1:numlabels       if(svmclassify(model{k},testdata(j,:)))          result(j) = k;         found=1;         break;       end    end    if(found==0) %not classified        result(j) = -1;      end 

however, faced problem data not classified because svmclassify returned 0 iterations. thus, want use predict function can pick label maximum score. can please me implement it.


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -