What is pasting, and how does it differ from bagging?

Last updated 5 November 2026

  • Pasting trains each model on a random row subset drawn without replacement. Bagging draws with replacement (bootstrap). Both aggregate by averaging or voting.

  • Pasting needs subsets smaller than the dataset, otherwise there is no diversity. Bootstrap's duplicates add extra randomness, giving slightly higher bias and lower ensemble variance.

  • Only bagging gives free out-of-bag estimates (scikit-learn's oob_score=True requires bootstrap=True).

  • https://www.csias.in/what-is-pasting-how-is-it-different-from-bagging/
  • https://kinder-chen.medium.com/bagging-and-pasting-eadfc88ddf1b
  • https://blog.preetparmar.com/bagging-and-pasting-ensemble-learning-using-scikit-learn/
All Random Forests interview questions