View source: R/supervised-svm.R
| tl_fit_svm | R Documentation |
Fit a support vector machine model
tl_fit_svm(
data,
formula,
is_classification = FALSE,
kernel = "radial",
cost = 1,
gamma = NULL,
degree = 3,
tune = FALSE,
tune_folds = 5,
...
)
data |
A data frame containing the training data |
formula |
A formula specifying the model |
is_classification |
Logical indicating if this is a classification problem |
kernel |
Kernel function ("linear", "polynomial", "radial", "sigmoid") |
cost |
Cost parameter (default: 1) |
gamma |
Gamma parameter for kernels (default: 1/ncol(data)) |
degree |
Degree for polynomial kernel (default: 3) |
tune |
Logical indicating whether to tune hyperparameters (default: FALSE) |
tune_folds |
Number of folds for cross-validation during tuning (default: 5) |
... |
Additional arguments to pass to svm() |
A fitted SVM model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.