MUH
MUH

Reputation: 123

Meaning of result in SVM using libsvm

I have recently started using libsvm package in matlab. I am getting the accuracy as a vector. I don't understand it. can someone explain this output. thanks in advance.

predict_label =
     1
    -1
     1
    -1
    -1
    -1
    -1
    -1
     1
    -1
    -1
     1
    -1
    -1
    -1


accuracy =
   86.6667
    0.5333
    0.5455

prob_values =
    0.6648    0.3352
    0.0275    0.9725
    0.5591    0.4409
    0.3320    0.6680
    0.2842    0.7158
    0.1899    0.8101
    0.4817    0.5183
    0.1820    0.8180
    0.7234    0.2766
    0.2326    0.7674
    0.0189    0.9811
    0.7356    0.2644
    0.2289    0.7711
    0.0743    0.9257
    0.0285    0.9715

this is my output of from this command:

[predict_label, accuracy, prob_values] = svmpredict(testLabel, [(1:N2)' testData*trainData'], model, '-b 1')

where N2 is a fixed value. The problem is the accuracy term.

Upvotes: 0

Views: 759

Answers (1)

ales_t
ales_t

Reputation: 2017

From this reference:

The function 'svmpredict' has three outputs. The first one, predictd_label, is a vector of predicted labels. The second output, accuracy, is a vector including accuracy (for classification), mean squared error, and squared correlation coefficient (for regression). The third is a matrix containing decision values or probability estimates (if '-b 1' is specified).

Upvotes: 1

Related Questions