Description Usage Arguments Value Examples
Perform cross-validation for the optimal lambda of ramsvm
.
1 2 3 4 |
x |
A n x p data matrix, where n is the number of observations and p is the number of variables. |
y |
A response vector with three and more labels. |
gamma |
The convex combination parameter of the loss function. |
valid_x |
A validation data matrix for selecting |
valid_y |
A validation response vector (optional). |
nfolds |
The number of folds for cross-validation. |
lambda_seq |
A sequence of regularization parameter to control a level of l_2-penalty. |
kernel |
A character string representing one of type of kernel. |
kparam |
A parameter needed for kernel. |
scale |
A logical value indicating whether to scale the variables. If |
criterion |
A type of criterion evaluating prediction performance of cross-validation. |
optModel |
A logical. Whether to obtain the optimal classification model. |
nCores |
The number of cores to use for parallel computing. |
... |
Other arguments that can be passed to ramsvm function. |
An S3 object of class "ramsvm
" containing the following slots
opt_param |
The optimal lambda and kernel parameter. |
opt_valid_err |
A minimum value of cross-validation errors. |
opt_ind |
An index of optimal lambda. |
valid_err |
Cross-validation errors. |
nfolds |
The number of folds for cross-validation. |
opt_model |
If |
call |
The call of |
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.