Theorems 3.3-3.4: a consistent hypothesis from a class of VC dimension d is PAC, with failure ≤ 2Φ_d(2m)2^(−εm/2) and explicit m
ProvedComputationalLearning.vc_sample_boundTheorem 3.3. Let be any concept class of VC dimension . Let be any algorithm that takes as input a set of labeled examples of a concept in , and produces as output a concept that is consistent with . Then is a PAC learning algorithm for provided it is given a random sample of examples from , where for some constant . Theorem 3.4 is the same with a hypothesis class of VC dimension in place of .
Formally, for a class of measurable hypotheses with , a measurable target for which is well-behaved (the double-sample event is null-measurable), a distribution , , and : (1) the probability that the points of a random sample of examples fail to form an -net for the error regions is at most (the bound of p. 61: , and by the random partition of the double sample); (2) hence every algorithm outputting a hypothesis in consistent with its sample has error greater than with probability at most ; (3) if moreover and , that probability is at most (the explicit constants of Blumer, Ehrenfeucht, Haussler and Warmuth, which instantiate the book's ); (4) consequently, if is nonempty, every class for whose targets is well-behaved is PAC learnable using . For no algorithm outputs hypotheses in , so (4) needs nonempty; the book's classes always are.
Why well-behavedness. The proof bounds the probability that the sample is not an -net by twice the probability of a double-sample event, and bounds the latter by averaging over the random swaps of the two samples. Both steps integrate over the double sample, so the event must be measurable. Blumer, Ehrenfeucht, Haussler and Warmuth (J. ACM 36, 1989) state the theorem for well-behaved classes for this reason. Without the condition the theorem is false. Take with the countable–cocountable -algebra and the probability measure that is on co-countable sets and on countable ones. Let be the final segments together with the empty concept; it has VC dimension and consists of measurable concepts. For the target , every finite sample misses , which has weight . So no sample is an -net, and the consistent learner that outputs has error with probability . The double-sample event fails to be measurable there, because is not measurable for the product -algebra.
import Definitions.Def_ComputationalLearning_VC open MeasureTheory
namespace ComputationalLearning
/-- **Theorems 3.3 and 3.4** (pp. 61–62). Let `H` be a class of VC dimension at most `d` and `L`
any algorithm that outputs a hypothesis `h ∈ H` consistent with its sample of `m` labeled
examples of a target concept `c`. Then `L` is a PAC learning algorithm for `c` using `H` once
`m ≥ c₀((1/ε) log(1/δ) + (d/ε) log(1/ε))`. Stated with the bound of the proof (§3.5.2, p. 61):
for `m ≥ 8/ε`, a random sample fails to be an ε-net for the error regions with probability at
most `2 Φ_d(2m) 2^{−εm/2}`, hence so does a consistent hypothesis fail to have error at most `ε`;
and with the explicit constants `m ≥ (4/ε) log₂(2/δ)` and `m ≥ (8d/ε) log₂(13/ε)` (Blumer,
Ehrenfeucht, Haussler and Warmuth) the failure probability is at most `δ`. Consequently, for
nonempty `H`, every class `C ⊆ H` is PAC learnable using `H` in the sample-complexity sense (for
`H = ∅` no algorithm outputs hypotheses in `H`). `H` is assumed well-behaved
(`IsWellBehaved`), the measurability the double-sample argument needs; without it the statement
is false for some classes of VC dimension `1`. -/
theorem vc_sample_bound {X : Type*} [MeasurableSpace X] (H : Set (X → Bool))
(hHm : ∀ h ∈ H, Measurable h) (d : ℕ) (hd : vcDim H ≤ d) (c : X → Bool) (hc : Measurable c)
(hwb : IsWellBehaved H c)
(D : Measure X) [IsProbabilityMeasure D] {ε δ : ℝ} (hε : 0 < ε) (hε1 : ε < 1) (hδ : 0 < δ)
(hδ1 : δ < 1) (m : ℕ) (hm : 8 / ε ≤ m) :
sampleLaw D c m {S | ¬ IsEpsNet H c D ε (samplePoints S)} ≤
ENNReal.ofReal (2 * Phi d (2 * m) * (2 : ℝ) ^ (-(ε * m / 2))) ∧
(∀ L : (Fin m → X × Bool) → X → Bool, (∀ S, L S ∈ H) →
(∀ S, IsLabeledBy c S → IsConsistent (L S) S) →
sampleLaw D c m {S | ε < errorOf D c (L S)} ≤
ENNReal.ofReal (2 * Phi d (2 * m) * (2 : ℝ) ^ (-(ε * m / 2)))) ∧
(4 / ε * Real.logb 2 (2 / δ) ≤ m → 8 * d / ε * Real.logb 2 (13 / ε) ≤ m →
∀ L : (Fin m → X × Bool) → X → Bool, (∀ S, L S ∈ H) →
(∀ S, IsLabeledBy c S → IsConsistent (L S) S) →
sampleLaw D c m {S | ε < errorOf D c (L S)} ≤ ENNReal.ofReal δ) ∧
(H.Nonempty → ∀ C : Set (X → Bool), C ⊆ H → (∀ c' ∈ C, IsWellBehaved H c') →
PACLearnable C H) := by sorry
end ComputationalLearning
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.