liveBook · Manning

Bootstrap sampling

As explained in Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

Bootstrap is a resampling technique that creates datasets by sampling observations with replacement from an observed dataset.

Bootstrap sampling creates multiple datasets by drawing observations with replacement from an observed sample. The resamples approximate the underlying population without requiring an explicit distribution, making the technique useful for estimating statistical uncertainty and model-performance variability. section 5.1.1

In machine learning, bootstrap samples also create diverse training sets for ensemble models. Less-correlated models generally make averaging more effective, while aggressive subsampling can introduce bias or omit important parts of the data. section 5.1.1 section 5.6

Use bootstrap sampling to:

  • Estimate the uncertainty or sampling distribution of a statistic. section 5.1.1
  • Train multiple models on varied datasets and pool their predictions through bagging. section 5.1.1 section 5.6
  • Distinguish bagging from pasting: bagging samples with replacement, whereas pasting samples without replacement. section 5.1.1

Bagged tree classifier

A scikit-learn BaggingClassifier can use decision trees with bootstrap=True, max_samples=1.0, max_features=1.0, and multiple estimators, creating an ensemble from bootstrapped training data.

How Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI covers it

How deep it goes
Defines sampling with replacement, explains its statistical and ensemble rationale, and stops short of mathematical derivations.
Examples
Uses statistical resamples, bagged decision trees, and scikit-learn sampling configurations.
What it assumes
Assumes observed sample data and basic ensemble vocabulary while defining bootstrapping and contrasting it with subsampling.
What you can do after
Apply bootstrap sampling to estimate uncertainty or configure bagged tree ensembles with scikit-learn.
How it connects
Connects bootstrap sampling with bagging, pasting, averaging, variance, bias, and random forests.

Also explained in

Compare how 5 books explain bootstrap sampling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI. The section links point to the parts of the book it draws on.