cv.abclass {abclass} | R Documentation |
Tune Angle-Based Classifiers by Cross-Validation
Description
Tune the regularization parameter for an angle-based large-margin classifier by cross-validation.
Usage
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,
...
)
Arguments
x |
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 |
y |
An integer vector, a character vector, or a factor vector representing the response label. |
intercept |
A logical value indicating if an intercept should be
considered in the model. The default value is |
weight |
A numeric vector for nonnegative observation weights. Equal observation weights are used by default. |
loss |
A character value specifying the loss function. The available
options are |
control |
A list of control parameters. See |
nfolds |
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 |
stratified |
A logical value indicating if the cross-validation
procedure should be stratified by the response label. The default value
is |
alignment |
A character vector specifying how to align the lambda
sequence used in the main fit with the cross-validation fits. The
available options are |
refit |
A logical value or a named list specifying if and how a refit
for those selected predictors should be performed. The default valie is
|
... |
Other control parameters passed to |
Value
An S3 object of class cv.abclass
.