SVM {structToolbox} | R Documentation |
Support vector machines model classifier. Wraps svm from the "e1071" package, which interfaces with the "libsvm" library to train SVM classifiers.
SVM( factor_name, kernel = "linear", degree = 3, gamma = 1, coef0 = 0, cost = 1, class_weights = NULL, ... )
factor_name |
The sample-meta column name to use for group labels |
kernel |
the kernel used in training and predicting. You
might consider changing some of the following parameters, depending
on the kernel type.
|
degree |
parameter needed for kernel of type |
gamma |
parameter needed for all kernels except |
coef0 |
parameter needed for kernels of type |
cost |
cost of constraints violation (default: 1)—it is the ‘C’-constant of the regularization term in the Lagrange formulation. |
class_weights |
a named vector of weights for the different classes, used for asymmetric class sizes. Not all factor levels have to be supplied (default weight: 1). All components have to be named. Specifying "inverse" will choose the weights inversely proportional to the class distribution. |
... |
additional slots and values passed to struct_class |
struct object
M = SVM(factor_name='Species',gamma=1)