vincet
vincet

Reputation: 977

Please explain the third parameter to svmtrain() when using Matlab

In the following snippet:

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

What does s O -t 2 mean?

Upvotes: 0

Views: 299

Answers (1)

nirvana-msu
nirvana-msu

Reputation: 4067

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.

Upvotes: 2

Related Questions