Description Usage Arguments Details Value Author(s) References See Also Examples
Conducts a k-fold cross-validation for sdwd
and returns the suggested values of the L1 parameter lambda
.
1 |
x |
A matrix of predictors, i.e., the |
y |
A vector of binary class labels, i.e., the |
lambda |
Default is |
pred.loss |
|
nfolds |
The number of folds. Default value is 5. The allowable range is from 3 to the sample size. Larger |
foldid |
An optional vector with values between 1 and |
... |
Other arguments that can be passed to |
This function runs sdwd
to the sparse DWD by excluding every fold alternatively, and then computes the mean cross-validation error and the standard deviation. This function is modified based on the cv
function from the gcdnet
and the glmnet
packages.
A cv.sdwd
object is returned, which includes the cross-validation fit.
lambda |
The |
cvm |
A vector of length |
cvsd |
A vector of length |
cvupper |
The upper curve: |
cvlower |
The lower curve: |
nzero |
Numbers of non-zero coefficients at each |
name |
“Mis-classification error", for plotting purposes. |
sdwd.fit |
A fitted |
lambda.min |
The |
lambda.1se |
The largest value of |
cv.min |
The minimum cross-validation error. |
cv.1se |
The cross-validation error associated with |
Boxiang Wang and Hui Zou
Maintainer: Boxiang Wang boxiang-wang@uiowa.edu
Wang, B. and Zou, H. (2016)
“Sparse Distance Weighted Discrimination", Journal of Computational and Graphical Statistics, 25(3), 826–838.
https://www.tandfonline.com/doi/full/10.1080/10618600.2015.1049700
Yang, Y. and Zou, H. (2013)
“An Efficient Algorithm for Computing the HHSVM and Its Generalizations",
Journal of Computational and Graphical Statistics, 22(2), 396–415.
https://www.tandfonline.com/doi/full/10.1080/10618600.2012.680324
Friedman, J., Hastie, T., and Tibshirani, R. (2010), "Regularization paths for generalized
linear models via coordinate descent," Journal of Statistical Software, 33(1), 1–22.
https://www.jstatsoft.org/v33/i01/paper
sdwd
, plot.cv.sdwd
, predict.cv.sdwd
, and coef.cv.sdwd
methods.
1 2 3 4 5 6 7 8 |
Loading required package: Matrix
1
[1,] 1
[2,] 1
[3,] 1
[4,] 1
[5,] 1
[6,] 1
[7,] 1
[8,] 1
[9,] 1
[10,] 1
[11,] 1
[12,] 1
[13,] 1
[14,] 1
[15,] 1
[16,] 1
[17,] 1
[18,] 1
[19,] 1
[20,] 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.