Bootstrap vs. cross-validation for model performance

So I have developed some logistic models, and obviously the next step is to validate them. I have no option for external validation, so internal is the way to go for me. On that note, I have been looking into this article (https://www.ncbi.nlm.nih.gov/pubmed/11470385) by Steyerberg and Harrell, which pretty much talks about internal validation.

So if I am understanding the paper correctly, the most accurate validation is achieved with regular bootstrapping - not even the .632 or +0.632 methods. In general I like bootstrapping more than CV, although often more computer intensive, but I just wanted to make sure that this was the way to go, or maybe that’s different from case to case ?

For example, what I usually hear is that bootstrapping estimates variability where CV is meant to quantify predictive accuracy. But in this paper it seems all things can be achieved through bootstrapping ?

Am I missing something here, or…?

5 Likes

10-fold cross-validation repeated 100 times is an excellent competitor of the Efron-Gong optimism bootstrap, and works even in extreme cases where N < p unlike the boostrap. Bootstrap and CV have exactly the same goals and recommended uses. For non-extreme cases it is faster to do the bootstrap, and the bootstrap has the advantage of officially validating building building with sample size N instead of \frac{9}{10}N. The 0.632 bootstrap was shown to be better only for discontinuous accuracy scoring rules.

Whether using bootstrap or CV, it is imperative that all supervised learning steps be repeated afresh when validating the model. Any analysis that utilized Y including any association-with-Y-based feature selection must be repeated afresh. Internal validation must be rigorous.

2 Likes

Thank you for the answer.

So what you are saying is, that it is pretty much up to me/others which technique is used, since they are all fairly good. But the only thing that needs to be emphasized is that all analysis steps must be re-done for all bootstrap re-samples ?

But something I don’t quite understand is that when bootstrapping, you create a new bootstrap sample with replacement, develop a new model so to speak, and then use that on the original bootstrap sample (at least that is how I understood in). Doesn’t that introduce some kind of bias since you are actually developing your model on data that is in some extent also present in the original bootstrap sample ? Isn’t that exactly why CV is used, to avoid that ? Or does bootstrapping include some kind of “magic” where this actually turns out to have very little effect ?

1 Like

Yes bootstrap and the slower 100 repeats of 10-fold cross-validation are equally good, and the latter is better in the extreme (e.g., N < p) case. All analysis steps must be re-done for both the bootstrap and cross-validation (the latter needs up to 1000 analyses, the bootstrap usually 300-400).

You’ve described the bootstrap process correctly. It sounds strange, but the bootstrap provides an excellent estimate of how much overfitting you have, then you subtract that amount. It is based on this philosophy:

  • want to estimate the performance in an infinitely large independent sample
  • estimate how much overfitting you have in your sample and subtract it
  • bootstrap samples have duplicate observations, result in super-overfitting
  • bootstrap computes the difference between super-overfitting and regular overfitting, the latter by evaluating the bootstrap model on the original sample
  • the difference between super overfitting and regular overfitting is the same as the real difference we want to estimate: between regular overfitting and no overfitting
3 Likes

Hello everybody. Great discussion! However, I’m having trouble in finding the commands of bootstrapping for internal validation in STATA. Any suggestions?

I am quite new in this forum, but I am really enjoying the discussions.

Thanks!

I’m somewhat familiar with Stata but haven’t performed internal validation in it so far. I came across the following post which might be of use: https://www.statalist.org/forums/forum/general-stata-discussion/general/1476201-bootstrap-for-internal-validation-how-can-we-calculate-the-testing-performance-the-performance-of-bootstrapmodel-in-the-original-sample

Stata has quite an active community on it’s own website/forum and on www.statalist.org! So I’m sure you could find more examples there if you want. When googling for ‘STATA bootstrap internal validation’ quite a few topics similar to the one linked pop up so I hope together those can be of help to you. The process is maybe a bit more laborious than in R (which I think is most used by the visitors here), but it certainly can be done

1 Like

Thanks so much! Very useful suggestions!