Theorem 11.8 — pseudo-dimension regression bound ()
DisprovedFoundationsML.Regression.pseudo_dimension_regression_bound_v2Statement (Theorem 11.8, p. 273, PDF p. 290). Let be a family of (measurable) real-valued functions and . Assume and is non-negative and bounded by . Then, for any , with probability at least over an i.i.d. sample of size , , for all :
Formalization Note. The retired version allowed , where every sample-dependent term is Lean's and the bound is false. Now and (standing conventions); is kept as the domain of Corollary 3.18's growth-function bound through which the proof passes. For with the pseudo-dimension term is Lean's , which is harmless: forces to consist of a single function and the bound reduces to Hoeffding's. Measurability of and of every is the standing convention, making the integrands of measurable and, being bounded, integrable.
import Mathlib import Definitions.Def_FoundationsML_Regression_GeneralizationError import Definitions.Def_FoundationsML_Regression_EmpiricalError import Definitions.Def_FoundationsML_Regression_LossComposedFamily import Definitions.Def_FoundationsML_Regression_PseudoDim open MeasureTheory
namespace FoundationsML.Regression
/-- Theorem 11.8 (Mohri, Rostamizadeh & Talwalkar, *Foundations of Machine Learning*, 2nd ed.,
MIT Press 2018, p. 273, PDF p. 290). Let `H` be a family of real-valued functions and
`G = {(x,y) ↦ L(h(x),y) : h ∈ H}`. Assume `Pdim(G) = d` and `L` is non-negative and bounded by
`M`. Then, for any `δ > 0`, with probability at least `1 − δ` over an i.i.d. sample `S` of
size `m ≥ 1` (`m ≥ d`), for all `h ∈ H`:
`R(h) ≤ R̂_S(h) + M sqrt(2d log(em/d)/m) + M sqrt(log(1/δ)/(2m))`.
**Formalization Note.** Replaces `pseudo_dimension_regression_bound`, which allowed
`d = m = 0` (every sample-dependent term is then Lean's `x / 0 = 0`). Now `m ≥ 1` and
`δ ∈ (0,1)` (standing conventions); `d ≤ m` is kept as the domain of Corollary 3.18's
growth-function bound through which the proof passes. `hL_meas`/`hH_meas` are the book's
standing measurability convention, making the integrands of `GeneralizationError` measurable
and (being bounded) integrable. -/
theorem pseudo_dimension_regression_bound_v2
{X : Type*} [MeasurableSpace X] (D : Measure (X × ℝ)) [IsProbabilityMeasure D]
(L : ℝ → ℝ → ℝ) (M : ℝ) (hM : 0 < M) (hLnn : ∀ y y', 0 ≤ L y y') (hLb : ∀ y y', L y y' ≤ M)
(hL_meas : Measurable (Function.uncurry L))
(H : Set (X → ℝ)) (hH_meas : ∀ h ∈ H, Measurable h)
(d : ℕ) (hPdim : PseudoDim (LossComposedFamily L H) d)
(m : ℕ) (hm : 0 < m) (hdm : d ≤ m) (δ : ℝ) (hδ : 0 < δ) (hδ1 : δ < 1) :
(1 - δ) ≤ (Measure.pi (fun _ : Fin m => D)
{S : Fin m → X × ℝ | ∀ h ∈ H,
GeneralizationError D L h ≤
EmpiricalError S L h +
M * Real.sqrt (2 * d * Real.log (Real.exp 1 * m / d) / m) +
M * Real.sqrt (Real.log (1 / δ) / (2 * m))}).toReal := by sorry
end FoundationsML.Regression