Alphabeta Math
AlgorithmAlgorithm: AI-adaptedProof: Not applicablePipeline-generatedjudge pass (gpt-6-luna)
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.

Bagged random-forest construction on a fixed finite sample

Definition

Fix training data D=((xi,yi))i=1n with n≥1, features xi∈Rp with p≥1, and one response mode: regression with yi∈R, or classification with labels in a fixed ordered finite set C={c1<⋯<cJ}, J≥1. Choose a finite integer depth cap dmax⁡≥0, an integer tree count B≥1, and a feature count m∈{1,…,p}. Choosing m=p disables feature randomization.

For every tree index b∈{1,…,B}, draw n independent uniform indices Ib1,…,Ibn from {1,…,n} and put Nbi=∣{r:Ibr=i}∣. For every possible binary node address ν of depth less than dmax⁡, draw a subset Mb,ν uniformly from the m-element subsets of {1,…,p}. All bootstrap-index and feature-subset draws are mutually independent across trees, index positions, and node addresses. Write Θb=(Nb1,…,Nbn,(Mb,ν)ν); thus the Θb are independent with a common law conditional on the fixed data and chosen settings.

At a node with bootstrap position set I, define yˉI=∣I∣−1∑r∈IyIbr in regression. In classification define qIk=∣I∣−1∣{r∈I:yIbr=ck}∣ and choose one fixed impurity, either misclassification 1−max⁡kqIk, Gini 1−∑kqIk2, or entropy −∑kqIklog⁡qIk, with 0log⁡0=0.

For tree b, write the resampled rows as Db∗=((xIbr,yIbr))r=1n, so bootstrap positions remain distinct even when they contain the same original row. Build Tb from Db∗, starting at the root with position set I={1,…,n}. At a node of depth d<dmax⁡, form the candidate midpoint thresholds between consecutive distinct observed values using the coordinates in that node's set Mb,ν. A candidate at coordinate j and threshold t partitions the current bootstrap positions into IL={r∈I:xIbr,j≤t} and IR={r∈I:xIbr,j>t}; only candidates with both children nonempty are used. Score each candidate by ∑r∈IL(yIbr−yˉIL)2+∑r∈IR(yIbr−yˉIR)2 in regression or by ∣IL∣QIL+∣IR∣QIR in classification, where Q is the chosen impurity. Select a candidate of least score, breaking ties by coordinate index and then cut index, and recurse on its two children. If d=dmax⁡ or there is no candidate, make the node a leaf. When m=p, this is the greedy CART growth procedure on the bootstrap sample; when m<p, the same procedure restricts each node's candidate coordinates to its sampled subset. Each regression leaf predicts its sample mean; each classification leaf predicts its most frequent class, choosing the least class index in a tie. Define h(x,Θb) by following the unique tree path for x.

For regression, the finite-forest prediction is B−1∑b=1Bh(x,Θb). For classification, it is the class receiving the largest number of votes, with the least class index breaking ties. For a training observation i, let Oi={b:Nbi=0}. Its out-of-bag prediction is formed using only trees indexed by Oi, with the same regression average or classification vote rule; if Oi=∅, no out-of-bag prediction is returned. An out-of-bag prediction is a diagnostic computed from this finite forest, not an exact identity for its full-forest prediction or risk.

The data flow is shown below. The arrows mean that the same fixed D and the independent randomization vector determine each tree, and the stated aggregation combines the resulting predictions; the diagram records the procedure and is not a proof of a performance claim.

¯xeddataDIID£bTb(x)=h(x;£b)voteoraverageoverb=1;:::;B

Depends on

Used by

Dependency tree · two levels

3 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.

Sources