[R] glmnet with binary logistic regression
Patrick Breheny
patrick.breheny at uky.edu
Sun Jul 24 14:12:03 CEST 2011
On 07/23/2011 11:43 AM, fongchun wrote:
> I was also thinking of a bootstrapping approach where I would actually run
> cv.glmnet say 100 times and then take the mean/median lambda across all the
> cv.glmnet runs. This way I generate a confidence interval for my optimal
> lambda I woud use in the end.
A simpler approach is to increase the number of folds. If you set the
number of folds equal to n ("leave-one-out" cross validation), the
outcome will no longer be random, as there is only one way of choosing
the fold partitions. The main reason people settle for 10-fold CV is
computational convenience when n is large, which is not a large problem
in your case.
--
Patrick Breheny
Assistant Professor
Department of Biostatistics
Department of Statistics
University of Kentucky
More information about the R-help
mailing list