cross-validation
cv.lhsc.Rd
Carry out a cross-validation for lhsc
to find optimal values of the tuning parameter lambda
.
Arguments
- x
A matrix of predictors, i.e., the matrix
x
used inlhsc
.- y
A vector of binary class labels, i.e., the
y
used inlhsc
.y
has to be two levels.- kern
A kernel function.
- lambda
A user specified
lambda
candidate sequence for cross-validation.- nfolds
The number of folds. Default value is 5. The allowable range is from 3 to the sample size.
- foldid
An optional vector with values between 1 and
nfold
, representing the fold indices for each observation. If supplied,nfold
can be missing.- ...
Other arguments being passed to
lhsc
.
Details
This function computes the mean cross-validation error and the standard error by fitting lhsc
with every fold excluded alternatively.
Value
A cv.lhsc
object including the cross-validation results is return.
- lambda
The
lambda
sequence used inlhsc
.- cvm
A vector of length
length(lambda)
: mean cross-validated error.- cvsd
A vector of length
length(lambda)
: estimates of standard error ofcvm
.- cvupper
The upper curve:
cvm + cvsd
.- cvlower
The lower curve:
cvm - cvsd
.- lambda.min
The
lambda
incurring the minimum cross validation errorcvm
.- lambda.1se
The largest value of
lambda
such that error is within one standard error of the minimum.- cvm.min
The cross-validation error corresponding to
lambda.min
, i.e., the least error.- cvm.1se
The cross-validation error corresponding to
lambda.1se
.
Author
Oh-Ran Kwon and Hui Zou
Maintainer: Oh-ran Kwon kwon0085@umn.edu
References
Kwon, O. and Zou, H. (2023+)
“Leaky Hockey Stick Loss: The First Negatively Divergent Margin-based Loss Function for Classification"
See also
lhsc
and plot.cv.lhsc