Corollary 2.3: for a finite class under realizability, with m ≥ log(|H|/δ)/ε every ERM hypothesis has true error ≤ ε with probability ≥ 1 − δ
ProvedUnderstandingML.erm_finite_class_boundermfinite-classespac-learningunion-bound
Corollary 2.3. Let be a finite hypothesis class. Let and and let be an integer that satisfies . Then, for any labeling function , and for any distribution , for which the realizability assumption holds (that is, for some , ), with probability of at least over the choice of an i.i.d. sample of size , we have that for every ERM hypothesis , it holds that .
Formally: for a finite class of measurable hypotheses, a distribution over , a measurable labeling function with the realizability assumption, , and , the probability under (of the labeled sample) that some ERM hypothesis for has true error greater than is at most (the proof's bound ).
Preamble
import Definitions.Def_UnderstandingML_Framework open MeasureTheory
Formal statement
namespace UnderstandingML
/-- **Corollary 2.3** (p. 40). Let `H` be a finite hypothesis class, `δ ∈ (0, 1)`, `ε > 0`, and let
`m` be an integer with `m ≥ log(|H|/δ)/ε`. Then, for any labeling function `f` and any
distribution `D` for which the realizability assumption holds, with probability at least
`1 − δ` over the choice of an i.i.d. sample `S` of size `m`, every ERM hypothesis `h_S` satisfies
`L_{(D,f)}(h_S) ≤ ε`. Stated as: the probability that some ERM hypothesis has true error
greater than `ε` is at most `δ` (the proof's bound `|H_B| e^{−εm}`). -/
theorem erm_finite_class_bound {X : Type*} [MeasurableSpace X] (H : Finset (X → Bool))
(hH : ∀ h ∈ H, Measurable h) {ε δ : ℝ} (hε : 0 < ε) (hδ : 0 < δ) (hδ1 : δ < 1) (m : ℕ)
(hm : Real.log (H.card / δ) / ε ≤ m) (D : Measure X) [IsProbabilityMeasure D] (f : X → Bool)
(hf : Measurable f) (hreal : Realizable (↑H) D f) :
iidLaw (labeledLaw D f) m {S | ∃ h, IsERM loss01 (↑H) S h ∧ ε < trueError D f h} ≤
ENNReal.ofReal δ := 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, §2.3.1 pp. 37-40, Corollary 2.3 with its proof (bad hypotheses, misleading samples, the union bound and (1 − ε)^m ≤ e^{−εm})
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.