Choose the optimal lambda for direct sparse discriminant analysis by cross validation.
cv.dsda(x, y, nfolds = 5, lambda=lambda, lambda.opt="min",
standardize=FALSE, alpha=1, eps=1e-7)
An n by p matrix containing the predictors.
An n-dimensional vector containing the class labels.
The number of folds to be used in cross validation. Default is 5.
A sequence of lambda's.
Should be either "min" or "max", specifying whether the smallest or the largest lambda with the smallest cross validation error should be used for the final classification rule.
A logic object indicating whether x.matrix should be standardized before performing DSDA. Default is FALSE.
The elasticnet mixing parameter, the same as in glmnet. Default is alpha=1 so that the lasso penalty is used.
Convergence threshold for coordinate descent, the same as in glmnet. Default is 1e-7.
The sequence of lambda's used in cross validation.
Cross validation errors.
The standard error of the cross validation errors.
The optimal lambda chosen by cross validation.
The fitted model.
Mai, Q., Zou, H. and Yuan, M. (2013). A direct approach to sparse discriminant analysis in ultra-high dimensions. Biometrika, 99, 29-42.
cv.dsda
predict.dsda
dsda