0

I use libsvm to do SVM Classification and I use one-over-rest method. The problem is when I run the following command, I found the values for "accuracy" are not all real numbers, there is NaN in it. Can anyone tell me how to fix the problem? Thank you so much!

model = ovrtrainBot(trainLabel, trainData, bestParam);

[predict_label, accuracy, decis_values] = ovrpredictBot(testLabel, testData, model);

There are strange values in "accuracy":

accuracy=[92.56 93.39   97.521  92.562  91.74 92.562    93.39   93.39 93.39
         0.074  0.07     0.025  0.074   0.083   0.074   0.07    0.066   0.066
         0.73   0.13     0.65   NaN     0.0007  NaN     0.104   0.433   0.104]
Angelababy
  • 247
  • 3
  • 7
  • 16

0 Answers0