All Vs All classification with kernlab R

1k views Asked by At

I could not find any documentation on how to perform All vs All multi-class classification with kernlab package in R. Any kind of help would be appreciated.

1

There are 1 answers

0
LyzandeR On BEST ANSWER

Well apparently the ksvm function of the package does it automatically as it says here .

This is how to use (I quote from the link above):

svp <- ksvm(xtrain,ytrain,type="C-svc",kernel=’vanilladot’,C=100,scaled=c())

And this is the comment below:

"Question 12

Test the ability of a SVM to predict the class of the disease from gene expression. Check the influence of the parameters. Finally, we may want to predict the type and stage of the diseases. We are then confronted with a multi-class problem, since the variable to predict can take more than two values:

y <- ALL$BT
print(y)

Fortunatelly, kernlab implements automatically multi-class SVM by an all-versus-all strategy to combine several binary SVM."