liveBook · Manning

Random patches

As explained in Ensemble Methods for Machine Learning

Random patches is an ensemble technique that trains models using independently sampled subsets of both training examples and input features.

Imagine building many image classifiers, each seeing a different set of images and pixels. Random patches creates this diversity by independently sampling both training examples and input features for every base estimator. section 2.4.2 section 2.0

Build a random-patches ensemble procedurally:

  • Choose a base learner, such as an SVC; the method is not restricted to decision trees. section 2.4.2
  • For each estimator, sample a subset of training examples and a subset of features, with or without replacement. section 2.4.2
  • Train the learner on its sampled rows and columns, then aggregate predictions across the independently trained estimators. section 2.0 section 2.6

A scikit-learn configuration

Use BaggingClassifier with max_samples=0.75 and bootstrap=True for example sampling, plus max_features=0.5 and bootstrap_features=True for feature sampling. Sampling features can make learners more efficient on image or text data with many dimensions. section 2.4.2

Figure 2.9 Bagging compared to random subspaces and random patches. The unshaded rows and columns represent training examples and features, respectively, that have been left out.
CH02_F09_Kunapuli

Compare which rows and columns remain available to bagging, random subspaces, and random patches. section 2.4.2

Unlike random forests, random patches samples features once before each base learner runs; random forests sample features inside randomized decision-tree growth. section 2.4.2

How Ensemble Methods for Machine Learning covers it

How deep it goes
Explains row-and-column sampling, estimator choice, implementation parameters, and contrast with random forests.
Examples
Uses image and text databases, SVC learners, and BaggingClassifier configurations with row and feature sampling.
What it assumes
Assumes ensemble learning, base estimators, bagging, and model aggregation while reinforcing sampling-based diversity.
What you can do after
Apply random patches through BaggingClassifier or another base learner to increase diversity and smooth predictions.
How it connects
Connects bagging, random subspaces, random forests, ensemble diversity, model aggregation, and support vector machines.

Also explained in

Compare how 2 books explain random patches →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Ensemble Methods for Machine Learning. The section links point to the parts of the book it draws on.