Combining Bootstrap and Cross-Validation I am trying to think of ways of combining bootstrap and cross-validation (CV) to get out-of-sample prediction error and its confidence interval. I was initially thinking of applying this to partial least squares analyses, but the question is more general. 
I've read a few papers that seem to do the bootstrap first (i.e. randomly resample the data), then run the model with CV (and repeat B times), to generate a distribution of r^2 values (or whetever metric for prediction error you like). This doesn't make sense to me, as it defeats the point of CV, as during the bootrap i think that makes 36% of your data repeated values. 
Alternatively, i was thinking it could be possible to start by calcuting the CV predicted values, then bootstrap-resample these, then calculate the final prediction error stat (e.g. r^2) and repeat to get a distribution of r^2? I'm not sure if this final method is justified however, as normally in bootstrapping you resample the data first and run the model to calculate your output. In this case, the model has been run, and just the predicted values are bootstrap-resampled to generate a distribution. 
Is the latter method justified? I've been trying to find papers on this which are written at a relatively accessible level... 
 A: The bootstrap is certainly one way of assessing internal validation of a model.  Ewout W. Steyerberg in his book Clinical Prediction Models describes how the bootstrap can be used to estimate optimism corrected performance.  The procedure is as follows:


*

*Construct a model in the original sample; determine the apparent performance on the data from the sample used to construct the model.  

*Draw a bootstrap sample (Sample*) with replacement from the original sample

*Construct a model (Model*) in Sample*, replaying every step that was done in the original sample, especially model specification steps such as selection of predictors. Determine the bootstrap performance as the apparent performance of Model* in Sample*;

*Apply Model* to the original sample without any modification to determine the test performance;

*Calculate the optimism (Bootstrap performance - test performance).

*Repeat steps 1-5 many times, at least 200, to obtain a stable mean estimate of the optimism.

*Subtract the mean optimism estimate from the apparent performance to obtain the optimism corrected performance.


In this scheme, the apparent performance is determined on the sample where the model was derived from.  In machine learning, this is often referred  to as training error.  If you're working with popular tools like caret or sklearn, Frank Harrell writes 10-fold repeated cross validation, repeated 100 times is an excellent competitor to this procedure
As for an interval estimate of the prediction error, the result of the above procedure provides an approximate sampling distribution to the optimism, and so you should be able to just subtract the apparent performance from each of the optimism bootstrap results, then estimate the interval by taking appropriate quantiles or by using bias adjusted bootstrap confidence intervals.  I would search for literature on this though, because although this sounds reasonable, I am not confident it is methodologically sound.
