Description Usage Arguments Value Examples
Derivative-based variable selection for the angle-based multicategory support vector machines with reinforced multicategory loss.
1 2 3 4 5 6 | dbvsmsvm(x, y, gamma = 0.5, valid_x = NULL, valid_y = NULL, nfolds = 10,
lambda_seq = 2^{seq(-10, 15, length.out = 100)},
v_seq = NULL, Nofv = 100, u_seq = NULL, Nofu = 100,
kernel = c("linear", "gaussian"), kparam = 1, scale = FALSE,
criterion = c("0-1", "hinge"), cv_type = c("standard", "osr"),
interaction = FALSE, optModel = FALSE, nCores = 1, ...)
|
x |
A n x p data matrix, where n is the number of observations and p is the number of variables. |
y |
A response variable 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. |
v_seq |
A sequence of threshold parameter to select informative variables. |
Nofv |
The number of threshold values. If |
u_seq |
A sequence of threshold parameter for interaction selection. |
Nofu |
The number of threshold values for interaction selection. If |
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. |
cv_type |
A rule of selecting threshold parameter. If |
interaction |
A logical. Whether to select interaction terms. |
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 "dbvsmsvm
" containing the following slots
selected |
A zero-one vector indicating the selected variables. |
lambda_cv_inform |
Information of cross-validation for lambda including cross-validation errors and optimal lambda value. |
selection_cv_inform |
Information of cross-validation for threshold parameter including cross-validation errors and optimal threshold value. |
interaction_selection_cv_inform |
Information of cross-validation for threshold parameter of interaction selection including cross-validation errors and optimal threshold value. |
opt_model |
If |
opt_valid_err |
If |
valid_err |
If |
cv_type |
A rule of selecting threshold parameter. |
call |
The call of |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | require(dbvsmsvm)
n = 100; p = 10;
data = dbvsmsvm:::sim_gen(n = n, p = p, type = "linear")
x = scale(data$x)
y = data$y
sigma = kernlab::sigest(y ~ x, scaled = FALSE)[3]
# Fit the DBVS-MSVM with the linear kernel
dbvs_linear = dbvsmsvm(x = x, y = y, nfolds = 5, lambda_seq = 2^{seq(-20, 0, length.out = 100)},
Nofv = 100, kernel = "linear", criterion = "0-1", scale = FALSE,
cv_type = "osr", interaction = FALSE, gamma = 0.5, optModel = FALSE, nCores = 1)
# Fit the DBVS-MSVM with the Gaussian kernel
dbvs_radial = dbvsmsvm(x = x, y = y, nfolds = 5, lambda_seq = 2^{seq(-20, 0, length.out = 100)},
Nofv = 100, kernel = "gaussian", kparam = sigma, criterion = "0-1", scale = FALSE,
cv_type = "osr", interaction = FALSE, gamma = 0.5, optModel = TRUE, nCores = 1)
# Fit the DBVS-MSVM with the Gaussian kernel for selecting second-order interaction
dbvs_interaction = dbvsmsvm(x = x, y = y, nfolds = 5, lambda_seq = 2^{seq(-20, 0, length.out = 100)},
Nofv = 100, kernel = "gaussian", kparam = sigma, criterion = "0-1", scale = FALSE,
cv_type = "osr", interaction = TRUE, gamma = 0.5, optModel = FALSE, nCores = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.