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

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -