Description Usage Arguments Details Value See Also Examples
The model is inited using the features and labels provided and training and selection is performed.
If the labels are given as a factor
classification is performed else least squares regression.
If testing data is provided then this is used to calculate predictions and if test labels are provided
also the test error and both are saved in $last_result
of the returned svm
object.
1 2 3 |
x |
either a formula or the features |
y |
either the data or the labels corresponding to the features |
... |
configuration parameters, see Configuration. Can be |
do.select |
can be set to a list to args to be passed to the select phase |
testdata |
if supplied then also testing is performed.
If this is |
testdata_labels |
the labels used if testing is also perfomed. |
scenario |
configures the model for a learning scenario:
E.g. |
d |
level of display information |
scale |
if |
predict.prob |
If |
The training data can either be provided using a formula and a corresponding data.frame
or the features and the labels are given directly.
svm
has one more difference to lsSVM
and mcSVM
because it uses scale=TRUE
by default and the others do not.
an object of type svm
. Depending on the usage this object
has also $train_errors
, $select_errors
, and $last_result
properties.
lsSVM
, mcSVM
, init.liquidSVM
, trainSVMs
, selectSVMs
1 2 3 4 5 6 7 8 9 | # since Species is a factor the following performs multiclass classification
modelIris <- svm(Species ~ ., iris)
# equivalently
modelIris <- svm(iris[,1:4], iris$Species)
# since Height is numeric the following performs least-squares regression
modelTrees <- svm(Height ~ Girth + Volume, trees)
# equivalently
modelTrees <- svm(trees[,c(1,3)],trees$Height)
|
sh: 1: grep: Permission denied
sh: 1: /bin/cat: Permission denied
sh: 1: grep: Permission denied
sh: 1: /bin/cat: Permission denied
Warning message:
In (function (model, command.args = NULL, ..., d = NULL, warn.suboptimal = getOption("liquidSVM.warn.suboptimal", :
Solution may not be optimal: try training again using max_gamma=25
Warning message:
In (function (model, command.args = NULL, ..., d = NULL, warn.suboptimal = getOption("liquidSVM.warn.suboptimal", :
Solution may not be optimal: try training again using max_gamma=25
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.