[R] How to do leave-n-out cross validation in R?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Aug 27 08:22:23 CEST 2003
On Tue, 26 Aug 2003, Lily wrote:
> Seems crossval from library(bootstrap) can only be
> used for leave-one-out and k-fold cross validation?
> Here is a dumb question, suppose n=80, how to do
> exactly leave-50-out cross validation? K-fold cross
> validation is not eligible for this case since
> n/ngroup is not an integer. Thanks!
First, _you_ have to say exactly what _you_ mean by leave-n-out CV. If you
can specify the algorithm, you can program it in R (or we may be able to
As I have never encountered this, I don't know the definition, nor do I
see the point. I suspect it is not really cross-validation at all (the
term is widely misused in the machine-learning/neural nets communities to
mean the use of a validation set).
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help