Description Usage Arguments Details Value See Also Examples
This routine is intended for both binary and multiclass
classification. The binary classification is treated by
an SVM solver for the classical hinge loss, and for the
multiclass case, one-verus-all and all-versus-all reductions
to binary classification for the hinge and the least
squares loss are provided. The error of the very first
task is the overall classification error.
svmMulticlass
is a simple alias of mcSVM
1 2 3 4 5 |
x |
either a formula or the features |
y |
either the data or the labels corresponding to the features |
... |
configuration parameters, see Configuration. Can be |
predict.prob |
If |
mc_type |
configures the the multiclass variants for All-vs-All / One-vs-All and with hinge or least squares loss. |
do.select |
if |
Please look at the demo-vignette (vignette('demo')
) for more examples.
mcSVM
is best used with factor
-labels. If there are just two levels in the factor,
or just two unique values if it is numeric
than a binary classification is performed.
Else, by using the parameter mc_type
different combinations of all-vs-all (AvA
)
and one-vs-all (OvA
) and hinge (hinge
) and least squares loss (ls
) can be used.
If a test is performed then not only the final decision is returned but also
the results of the intermediate binary classifications. This is indicated in the column names.
If the training labels are given by a factor
then the final decision will be encoded
in this factor. If this is the case and AvA_hinge
is used,
then also the binary classification problems will receive the corresponding label...
an object of type svm
. Depending on the usage this object
has also $train_errors
, $select_errors
, and $last_result
properties.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.