0
votes

In the following snippet:

model = svmtrain(train_label, train_set, '-s 0 -t 2');

What does s O -t 2 mean?

1

1 Answers

2
votes

From LibSVM docs:

-s svm_type : set type of SVM (default 0)
    0 -- C-SVC
    1 -- nu-SVC
    2 -- one-class SVM
    3 -- epsilon-SVR
    4 -- nu-SVR
-t kernel_type : set type of kernel function (default 2)
    0 -- linear: u'*v
    1 -- polynomial: (gamma*u'*v + coef0)^degree
    2 -- radial basis function: exp(-gamma*|u-v|^2)
    3 -- sigmoid: tanh(gamma*u'*v + coef0)

So -s 0 -t 2 would mean you are trying to train C-SVC classifier with RBF kernel.