svmlight(x, ...)
"svmlight"(x, grouping, temp.dir = NULL, pathsvm = NULL, del = TRUE, type = "C", class.type = "oaa", svm.options = NULL, prior = NULL, out = FALSE, ...)
"svmlight"(x, ...)
"svmlight"(x, grouping, ..., subset, na.action = na.fail)
"svmlight"(formula, data = NULL, ..., subset, na.action = na.fail)
formula
is not given).formula
is not given).groups ~ x1 + x2 + ...
.
That is, the response is the grouping factor and the right hand side specifies the (non-factor) discriminators.formula
are preferentially to be taken."C"
=Classification or "R"
=RegressionNA
s are
found. The default action is for the procedure to fail. An
alternative is na.omit
, which leads to rejection of cases with
missing values on any required variable. (Note: If given, this
argument must be named.) type="C"
).
SVMlight is an implementation of Vapnik's Support Vector Machine. It
is written in C by Thorsten Joachims. On the homepage (see below) the
source-code and several binaries for SVMlight are available. If more
then two classes are given the SVM is learned by the one-against-all
scheme (class.type="oaa"
). That means that each class is trained against the other K-1
classes. The class with the highest decision function in the SVM
wins. So K SVMs have to be learned.
If class.type="oao"
each class is tested against every other and the final class is elected
by a majority vote. If type="R"
a SVM Regression is performed.
predict.svmlight
,svm
,
## Not run:
# ## Only works if the svmlight binaries are in the path.
# data(iris)
# x <- svmlight(Species ~ ., data = iris)
# ## Using RBF-Kernel with gamma=0.1:
# data(B3)
# x <- svmlight(PHASEN ~ ., data = B3, svm.options = "-t 2 -g 0.1")
# ## End(Not run)
Run the code above in your browser using DataLab