View source: R/svm_classifier_class.R
SVM | R Documentation |
Support Vector Machines (SVM) are a machine learning algorithm for classification. They can make use of kernel functions to generate highly non-linear boundaries between groups.
SVM(
factor_name,
kernel = "linear",
degree = 3,
gamma = 1,
coef0 = 0,
cost = 1,
class_weights = NULL,
...
)
factor_name |
(character) The name of a sample-meta column to use. |
kernel |
(character) Kernel type. Allowed values are limited to the following:
The default is |
degree |
(numeric) The polynomial degree. The default is |
gamma |
(numeric) The gamma parameter. The default is |
coef0 |
(numeric) The offset coefficient. The default is |
cost |
(numeric) The cost of violating the constraints. The default is |
class_weights |
(numeric, character, NULL) A named vector of weights for the different classes. Specifying
"inverse" will choose the weights inversely proportional to the class distribution. The default is |
... |
Additional slots and values passed to |
This object makes use of functionality from the following packages:
e1071
A SVM
object with the following output
slots:
SV | (matrix) |
index | (numeric) |
coefs | (matrix) |
pred | (data.frame) |
decision_values | (data.frame) |
struct object
A SVM
object inherits the following struct
classes:
[SVM]
>> [model]
>> [struct_class]
Meyer D, Dimitriadou E, Hornik K, Weingessel A, Leisch F (2023). e1071: Misc Functions of the Department of Statistics, Probability Theory Group (Formerly: E1071), TU Wien. R package version 1.7-14, https://CRAN.R-project.org/package=e1071.
Brereton RG, Lloyd GR (2010). "Support Vector Machines for classification and regression." The Analyst, 135(2), 230-267.
M = SVM(
factor_name = "V1",
kernel = "linear",
degree = 3,
gamma = 1,
coef0 = 0,
cost = 1,
class_weights = 1)
M = SVM(factor_name='Species',gamma=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.