cv.irsvm | R Documentation |
Does k-fold cross-validation for irsvm
## S3 method for class 'formula'
cv.irsvm(formula, data, weights, contrasts=NULL, ...)
## S3 method for class 'matrix'
cv.irsvm(x, y, weights, ...)
## Default S3 method:
cv.irsvm(x, ...)
formula |
symbolic description of the model, see details. |
data |
argument controlling formula processing
via |
x |
|
y |
response |
weights |
Observation weights; defaults to 1 per observation |
contrasts |
the contrasts corresponding to |
... |
Other arguments that can be passed to |
Does a K-fold cross-validation to determine optimal tuning parameters in SVM: cost
and gamma
if kernel
is nonlinear. It can also choose s
used in cfun
.
An object contains a list of ingredients of cross-validation including optimal tuning parameters.
residmat |
matrix with row values for |
cost |
a value of |
gamma |
a value of |
s |
value of |
Zhu Wang <zwang145@uthsc.edu>
Zhu Wang (2024) Unified Robust Estimation, Australian & New Zealand Journal of Statistics. 66(1):77-102.
irsvm
## Not run:
x <- matrix(rnorm(40*2), ncol=2)
y <- c(rep(-1, 20), rep(1, 20))
x[y==1,] <- x[y==1, ] + 1
irsvm.opt <- cv.irsvm(x, y, type="C-classification", s=1, kernel="linear", cfun="acave")
irsvm.opt$cost
irsvm.opt$gamma
irsvm.opt$s
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.