Crossvalidation for msda
Description
Does kfold crossvalidation for msda, returns a value for lambda
.
Usage
1 
Arguments
x 
matrix of predictors, of dimension N*p; each row is an observation vector. 
y 
response variable. This argument should be a factor for classification. 
nfolds 
number of folds  default is 5. Although 
lambda 
optional usersupplied lambda sequence; default is

lambda.opt 
If choose 
... 
other arguments that can be passed to msda. 
Details
The function runs msda
nfolds
+1 times; the
first to get the lambda
sequence, and then the remainder to
compute the fit with each of the folds omitted. The average error and standard deviation over the folds are computed.
Value
an object of class cv.msda
is returned, which is a
list with the ingredients of the crossvalidation fit.
lambda 
the values of 
cvm 
the mean crossvalidated error  a vector of length

cvsd 
estimate of standard error of 
lambda.min 
the optimal value of 
lambda.1se 
the largest value of 
msda.fit 
a fitted 
Author(s)
Qing Mai <mai@stat.fsu.edu>, Yi Yang <yiyang@umn.edu>, Hui Zou <hzou@stat.umn.edu>
Maintainer: Yi Yang <yiyang@umn.edu>
References
Mai, Q.*, Yang, Y.*, and Zou, H. (2014), "Multiclass Sparse Discriminant Analysis." Submitted to Journal of the American Statistical Association. (* cofirst author)
URL: https://github.com/emeryyi/msda
See Also
msda
Examples
1 2 3 4 5 6 7 
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.