svmpredict
This function predicts new labels from a testing instance matrtix based on an SVM model created with svmtrain
.
svmtrain
function.
libsvm_options
: A string of testing options in the same format as that of LIBSVM.
libsvm_options
:
-b
: probability_estimates; whether to predict probability estimates. For one-class SVM only 0 is supported.
0 | return decision values. (default) | |
1 | return probability estimates. |
-q
: quiet mode. (no outputs)
The svmpredict
function has three outputs. The first one, predicted_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). If is the number of classes in training data, for decision values, each row includes results of predicting binary-class SVMs. For classification, is a special case. Decision value +1 is returned for each testing instance, instead of an empty vector. For probabilities, each row contains values indicating the probability that the testing instance is in each class. Note that the order of classes here is the same as Label
field in the model structure.
Source Code: svmpredict