Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Example 10.1: ERM over decision stumps is a 1/12-weak learner for the class of 3-piece classifiers over ℝ

Proved
UnderstandingML.stumps_weakly_learn_three_piece

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

decision-stumpsermweak-learning

Example 10.1 (Weak Learning of 3-Piece Classifiers Using Decision Stumps). Let X=RX = \mathbb{R}X=R and let HHH be the class of 3-piece classifiers hθ1,θ2,bh_{\theta_1,\theta_2,b}hθ1​,θ2​,b​ (θ1<θ2\theta_1 < \theta_2θ1​<θ2​, b∈{±1}b \in \{\pm1\}b∈{±1}), equal to bbb on x<θ1x < \theta_1x<θ1​ or x>θ2x > \theta_2x>θ2​ and to −b-b−b on [θ1,θ2][\theta_1, \theta_2][θ1​,θ2​]. Let BBB be the class of decision stumps {x↦sign⁡(x−θ)⋅b}\{x \mapsto \operatorname{sign}(x - \theta)\cdot b\}{x↦sign(x−θ)⋅b}. Then ERMBERM_BERMB​ is a γ-weak learner for HHH, for γ=1/12\gamma = 1/12γ=1/12: for every distribution consistent with HHH there is a decision stump with LD(h)≤1/3L_D(h) \le 1/3LD​(h)≤1/3, and since VCdim(B)=2\mathrm{VCdim}(B) = 2VCdim(B)=2, with enough examples ERMBERM_BERMB​ returns with probability at least 1−δ1-\delta1−δ a hypothesis with error at most 1/3+1/12=1/2−1/121/3 + 1/12 = 1/2 - 1/121/3+1/12=1/2−1/12.

Formally: there is one sample-size function mHm_HmH​ such that every ERM learner over the decision stumps is a 1/121/121/12-weak learner for the 3-piece classifiers with mHm_HmH​.

Preamble
import Definitions.Def_UnderstandingML_Boosting

open MeasureTheory
Formal statement
namespace UnderstandingML

/-- **Example 10.1** (pp. 132–133). Let `X = ℝ`, `H` the class of 3-piece classifiers and `B`
the class of decision stumps. Then `ERM_B` is a γ-weak learner for `H` with `γ = 1/12`: for
every distribution consistent with `H` some decision stump has error at most `1/3`, and since
`VCdim(B) = 2`, with enough examples the `ERM_B` rule returns, with probability at least
`1 − δ`, a hypothesis with error at most `1/3 + 1/12 = 1/2 − 1/12`. Stated for every ERM
learner over the stumps, with one sample-size function. -/
theorem stumps_weakly_learn_three_piece :
    ∃ mH : ℝ → ℕ, ∀ A : Learner (ℝ × Bool) (ℝ → Bool), IsERMLearner loss01 decisionStumps A →
      IsWeakLearnerWith threePieceClassifiers (1 / 12) A mH := by sorry

end UnderstandingML
Source
Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press 2014, doi:10.1017/CBO9781107298019, §10.1 Example 10.1 pp. 132-133
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me