user395882
user395882

Reputation: 665

SVM function in R

I am using R for classification problem. Does svm function in R support only binary classfication or supports multi class classification as welll?

Upvotes: 2

Views: 1403

Answers (2)

Renata Ghisloti
Renata Ghisloti

Reputation: 557

The e1071 R package supports multi class classification using a "one-against-one-method".

Here are the classifications in this package:

  • v-classi cation: this model allows for more control over the number of support vectors (see Scholkopf et al., 2000) by specifying an additional parameter which approximates the fraction of support vectors;

  • One-class-classi cation: this model tries to find the support of a distribution and thus allows for outlier/novelty detection;

  • Multi-class classi cation: basically, SVMs can only solve binary classi cation problems. To allow for multi-class classi cation, libsvm uses the one-against-one technique by fi tting all binary subclassi ers and finding the correct class by a voting mechanism; 

  • e-regression: here, the data points lie in between the two borders of the margin which is maximized under suitable conditions to avoid outlier inclusion;

Check https://cran.r-project.org/web/packages/e1071/vignettes/svmdoc.pdf

Upvotes: 0

Yorgos
Yorgos

Reputation: 30485

svm (in package e1071) supports multi class classification using the ‘one-against-one’-approach. Same with ksvm (in kernlab).

Upvotes: 3

Related Questions