Tune the regularization parameter for an angle-based large-margin classifier by cross-validation.
cv.abclass(
x,
y,
intercept = TRUE,
weight = NULL,
loss = c("logistic", "boost", "hinge-boost", "lum"),
control = list(),
nfolds = 5L,
stratified = TRUE,
alignment = c("fraction", "lambda"),
refit = FALSE,
...
)
An S3 object of class cv.abclass
.
A numeric matrix representing the design matrix. No missing valus
are allowed. The coefficient estimates for constant columns will be
zero. Thus, one should set the argument intercept
to TRUE
to include an intercept term instead of adding an all-one column to
x
.
An integer vector, a character vector, or a factor vector representing the response label.
A logical value indicating if an intercept should be
considered in the model. The default value is TRUE
and the
intercept is excluded from regularization.
A numeric vector for nonnegative observation weights. Equal observation weights are used by default.
A character value specifying the loss function. The available
options are "logistic"
for the logistic deviance loss,
"boost"
for the exponential loss approximating Boosting machines,
"hinge-boost"
for hybrid of SVM and AdaBoost machine, and
"lum"
for largin-margin unified machines (LUM). See Liu, et
al. (2011) for details.
A list of control parameters. See abclass.control()
for details.
A positive integer specifying the number of folds for
cross-validation. Five-folds cross-validation will be used by default.
An error will be thrown out if the nfolds
is specified to be less
than 2.
A logical value indicating if the cross-validation
procedure should be stratified by the response label. The default value
is TRUE
to ensure the same number of categories be used in
validation and training.
A character vector specifying how to align the lambda
sequence used in the main fit with the cross-validation fits. The
available options are "fraction"
for allowing cross-validation
fits to have their own lambda sequences and "lambda"
for using
the same lambda sequence of the main fit. The option "lambda"
will be applied if a meaningful lambda
is specified. The default
value is "fraction"
.
A logical value or a named list specifying if and how a refit
for those selected predictors should be performed. The default valie is
FALSE
.
Other control parameters passed to abclass.control()
.