Random patches is an averaging-based ensemble technique for reducing prediction variance. Each model trains on a randomly selected subset of training examples and a randomly selected subset of features, both sampled without replacement. section 5.1.1
The practical goal is to create models that differ from one another. Combining their predictions can produce more reliable results than relying on one model, especially when variance is a concern in tabular-data problems. section 5.1.1 section 5.1.2
Random patches differs from nearby averaging strategies by varying two parts of the training data:
- Pasting samples training examples without replacement but retains all features. section 5.1.1
- Bagging samples training examples with replacement while retaining all features. section 5.1.1
- Random subspaces retain all training examples but sample features without replacement. section 5.1.1
- Random patches sample both training examples and features without replacement. section 5.1.1
Connection to random forests
Random forests use a related combination of sample bootstrapping and feature sampling. Feature candidates are sampled at each tree split, producing diverse tree structures whose classifications are combined by majority voting. section 5.1.2
Table 5.1 Bagging and sampling strategies (view table figure)
| Averaging strategy |
What happens to data |
Parameters for BaggingClassifier/BaggingRegressor |
|---|---|---|
| Pasting |
Training examples are sampled without replacement |
bootstrap = False max_samples < 1.0 max_features = 1.0 |
| Bagging |
Training examples are sampled with replacement (bootstrapping) |
bootstrap = True max_samples = 1.0 max_features = 1.0 |
| Random subspaces |
Features are sampled (without replacement) |
bootstrap = False max_samples = 1.0 max_features < 1.0 |
| Random patches |
Training examples and features are sampled without replacement |
bootstrap = False max_samples < 1.0 max_features < 1.0 |
Compare how pasting, bagging, random subspaces, and random patches alter training examples, features, and BaggingClassifier or BaggingRegressor parameters. section 5.1.1

