Random Subspaces Patches
ML-07-Ensemble: Random Subspaces/Patches are described three times (in the Ensembling methods block, the How-it-works tab, and the Tradeoffs tab).
Bagging-style ensembles train the same algorithm on different random samples of the training set. Each predictor's sample can randomize the rows (instances), the columns (features), or both. The named strategies are the combinations:
| All features | Sampled features | |
|---|---|---|
| All rows | — (no diversity) | Random Subspaces |
| Sampled rows | Bagging (with replacement) / Pasting (without) | Random Patches |
These are sampling strategies, not separate algorithms. In sklearn, each one is a BaggingClassifier / BaggingRegressor setting:
| Strategy | Rows | Features |
|---|---|---|
| Bagging | bootstrap=True |
all |
| Pasting | bootstrap=False, max_samples < 1.0 |
all |
| Random Subspaces | bootstrap=False, max_samples=1.0 |
bootstrap_features=True and/or max_features < 1.0 |
| Random Patches | max_samples < 1.0 (either bootstrap value) |
bootstrap_features=True and/or max_features < 1.0 |
Effect: sampling features adds diversity among predictors → lower variance, at the cost of slightly higher bias. Most useful with high-dimensional inputs (e.g., images). See Over-Under-Fitting.
vs Random Forest: Random Subspaces and Random Patches draw a feature subset once per predictor. A random forest draws a new random feature subset at every split inside each tree (max_features), on top of bagging the rows.