| cv_tsvm | R Documentation |
Runs k-fold cross-validation over c1, c2, and optionally gamma.
cv_tsvm(x, y, c1_grid, c2_grid, gamma_grid = NULL, k = 5, ...)
x |
Numeric matrix or data frame of predictors. |
y |
Two-class response. |
c1_grid, c2_grid |
Positive numeric vectors. |
gamma_grid |
Optional positive numeric vector. If |
k |
Number of folds. |
... |
Additional arguments passed to |
A cv_tsvm object with best_params and results.
set.seed(10)
dat <- gen_moons(40, noise = 0.1)
cv <- cv_tsvm(dat$x, dat$y, c1_grid = c(0.1, 1), c2_grid = c(0.1, 1), k = 3)
cv$best_params
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.