How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Bagging and random forests — Examples
1 · Prerequisites
- Absolute and Conditional Convergence; Rearrangement; Products
- Bagging and random forests
- Binary Operations, Monoids, Groups and Subgroups
- CART trees and pruning
- Compactness in Metric Spaces
- Completeness, Completion, and Uniform Continuity
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Continuity, IVT, EVT, and Uniform Continuity
- Cosets, Index and Lagrange's Theorem
- Countability and Uncountability
- Divisibility, Euclidean Domains, Principal Ideal Domains and Unique Factorisation
- Dual Spaces, Bilinear and Quadratic Forms, and Sylvester's Law of Inertia
- Equivalent Forms of Completeness
- Finite Counting, Factorials and Binomial Coefficients
- Finite Probability Spaces and Random Variables
- Foundations of the Real Numbers for Analysis
- Ideals, Quotient Rings and the Isomorphism Theorems for Rings
- Independence Borel Cantelli and Zero One Laws
- Inner Product Spaces, Gram-Schmidt, Projections and Adjoints
- Limits of Real Functions
- limsup, liminf, and Subsequential Limits
- Linear Independence, Bases and Dimension
- Linear Transformations, Rank-Nullity and Quotient Spaces
- Matrices, the Matrix of a Linear Map, and Change of Basis
- Measurable Functions and Simple Approximation
- Measures and Their Basic Properties
- Metric Spaces
- Modes of Convergence for Random Variables
- Monotone Functions, Discontinuities, and Continuity Sets
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Normal Subgroups and Quotient Groups
- Order, Zorn's Lemma, and the Axiom of Choice
- Pointwise Extended-Real Function Products
- Polynomial Rings, the Division Algorithm and Roots
- Power Series and Real-Analytic Functions
- Probability Spaces Random Variables and Expectation
- Product Measures and the Fubini Tonelli Theorems
- Properties of the Integral and the Working FTC
- Relations, Functions, and Quotients
- Rings, Subrings, Integral Domains and Fields
- Roots, Rational Powers, and Classical Inequalities
- Sequences and Limits
- Sequences and Series of Functions; Uniform Convergence
- Series: Convergence and the Nonnegative Tests
- Sigma Algebras and Borel Sets
- Simple Field Extensions and the Construction of the Complex Numbers
- Strong Laws of Large Numbers
- Suprema and Infima
- The Derivative and the Mean Value Theorems
- The Exponential Function
- The Lebesgue Integral and the Convergence Theorems
- The Logarithm and General Powers
- The Lᵖ Spaces Holder Minkowski and Riesz Fischer
- The Riemann Integral: Definition and Integrability
- The ZFC Axioms and the Basic Set Constructions
- Topological Spaces and Continuity
- Topology of ℝ
- Triangularisation, Generalised Eigenspaces and Jordan Canonical Form
- Vector Spaces, Linear Subspaces, Span and Direct Sums
- Weak Laws and Series of Independent Random Variables
2 · Logical flowchart
3 · Definitions, theorems and proofs
None yet.
4 · Examples, counterexamples and false statements
A zero-margin bootstrap forest need not approach strict-margin risk
Example
Use classification labels and the fixed training sample with and . Grow trees with depth cap and one uniformly selected feature at the root, along with the size- bootstrap samples in the bagged random-forest algorithm. Let be IID tree randomizations with common law , write , and define . Let the test pair have the point-mass law at , and for trees let be their majority vote with class breaking a tie and . Then each randomized tree predicts class at with probability , so and . For every odd , has expectation over the tree randomizations; consequently it cannot converge almost surely to the strict-margin value .
For a mixed bootstrap sample, the two possible root splits and their leaf labels are shown below. In each tree the left child is selected when the displayed feature is at most , and the right child otherwise. The test point lies in the left child of both trees, whose labels differ. The diagram records these two CART cases; the verification derives the risk from the finite randomization counts and does not rely on the diagram.
diagram failed to render:
\begin{tikzpicture}[level distance=10mm,sibling distance=18mm]
\node[draw] at (0,0) {$x_1\le\tfrac12$}
child {node[draw] {$0$}}
child {node[draw] {$1$}};
\node[draw] at (6,0) {$x_2\le\tfrac12$}
child {node[draw] {$1$}}
child {node[draw] {$0$}};
\end{tikzpicture}Example references
Facts & Assumptions
Given: The sample and test law in the Example, independent bootstrap samples of size , and independent uniform one-feature choices at each tree root.
Bagged random-forest construction on a fixed finite sample: A bootstrap sample contains copies of training observation , and a node uses its independently drawn feature subset when forming split candidates.
Independent random elements have product joint law: The joint law of a finite independent family of random elements is the product of their marginal laws.
Dominated convergence: Almost-everywhere convergence under a common integrable majorant implies convergence of the integrals.
Almost-sure limiting risk of an infinite random-forest classifier: The stated conditional-risk limit assumes that the zero-margin test-pair set has probability zero.
Verification
There are four equally likely ordered bootstrap draws. The count vectors and each have probability , and the mixed count vector has probability .
With counts the only leaf predicts , and with counts it predicts . With mixed counts, either feature separates the two training points at . The selected feature is uniform: feature sends to the class- leaf, while feature sends it to the class- leaf. Hence .
At the point-mass test pair, , so and ; the zero-margin hypothesis in [F4] fails. For every odd , the class- vote count has a symmetric binomial law with no tie; exactly half of its outcomes are below . The conditional risk is the error indicator at this single test pair, so .
If almost surely, then the bounded random variables would have expectations tending to zero by [F3]. This is incompatible with step 3.1, so the full risk sequence cannot converge almost surely to the strict-margin value .
An out-of-bag prediction can differ from the full finite forest
Example
Take the classification sample with ordered labels , grow depth-zero trees, and use bootstrap trees. A tree is out of bag for observation exactly when its bootstrap count for training index is zero. On the event that the first bootstrap count vector is and the second is , the full forest receives one vote for each class and predicts by the least-index tie rule. The out-of-bag set for observation is then , so its out-of-bag prediction is . This event has probability , and it exhibits a finite-forest out-of-bag prediction that differs from the full finite-forest prediction.
Example references
Facts & Assumptions
Given: Two independent size- bootstrap samples drawn uniformly with replacement from the two-observation training sample, with depth cap zero and the class tie rule in the Example.
Bagged random-forest construction on a fixed finite sample: The out-of-bag set for observation consists exactly of tree indices with , and no prediction is returned when this set is empty.
Empirical axis-aligned binary decision trees: A classification leaf predicts the most frequent class, choosing the least class index in a tie.
Independent random elements have product joint law: The joint law of a finite independent family of random elements is the product of their marginal laws.
Verification
Each tree draws two independent uniform indices from . The probability of counts for tree is , and the probability of counts for tree is . Independence of the two trees gives probability for the stated event.
With depth cap zero, each tree is a single leaf. Its bootstrap sample contains only label for counts and only label for counts , so [F2] gives predictions and , respectively.
The full forest has one vote for each class, so its least-index tie rule returns . For observation , the first tree has and is excluded from the out-of-bag set, while the second has and is the only included tree; its prediction is . The two predictions differ on the positive-probability event from step 1.1.
A two-stump strength and correlation calculation
Example
Let , , with and . Conditional on fixed training data, let each randomized tree independently be the constant class- stump with probability and the constant class- stump with probability . For a randomization , write ; for define , , and . For each tree set and . For independent randomizations let and . Then the limiting margins at the two test pairs are and , so and . Each tree's raw-margin standard deviation is , the covariance numerator defining is , and . The strength-correlation bound has right-hand side in this example.
Example references
Facts & Assumptions
Given: The test law and independent two-stump randomization law in the Example.
Bagged random-forest construction on a fixed finite sample: A regression or classification forest aggregates trees with a fixed class order, and a classification tree casts one class vote.
Breiman's random-forest strength–correlation error bound: The strength is , tree standard deviations are , and for the correlation parameter is the expected independent-pair covariance divided by .
Expectation of a nonnegative or integrable random variable: Expectation on a probability space is integration against its probability measure.
Moments, variance, and covariance on a probability space: Variance and covariance are expectations of the corresponding centered products.
Independent random elements have product joint law: The joint law of a finite independent family of random elements is the product of their marginal laws.
Verification
By the tree-vote convention [F1], at the correct class receives probability and the wrong class , giving margin . At , the correct class receives probability and the wrong class , giving margin . Therefore and .
For tree type , the raw margin is at and at ; its mean is and its second moment is , so its variance is . Type reverses the two signs, giving mean and the same variance . Thus and .
The independent pair has probabilities , , and total mixed probability . The covariance over is for equal types and for mixed types, so its expectation is . By [F2] and [F5], .
Substitution gives , and the example's error satisfies the bound.