Documentation

CslibFrontier.MachineLearning.PACLearning.EpsilonApproximation

ε-approximations for classes of finite VC dimension on countable domains #

A finite sequence S of points is an ε-approximation for a class G of Boolean functions under a probability measure μ when, for every g ∈ G, the relative frequency of {g = true} in S is within ε of μ {g = true}. Vapnik and Chervonenkis showed that a class of finite VC dimension has ε-approximations of a size independent of μ [VapnikChervonenkis1971; MoranYehudayoff2016, Theorem 2.1]. Here this follows from their uniform convergence theorem (VCUniformConvergence.lean): m i.i.d. samples from μ fail to be an ε-approximation with probability at most δ once m ≥ uniformConvergenceSampleSize d ε δ, so for δ < 1 some sample succeeds.

The size uniformConvergenceSampleSize d ε δ = (16 / ε²) (2 d log (10 / ε) + log (4 / δ)) is O(d log (1 / ε) / ε²), weaker by the factor log (1 / ε) than the O(d / ε²) stated in [MoranYehudayoff2016, Theorem 2.1], which credits that improvement to Li, Long and Srinivasan and to Talagrand; their chaining arguments are not formalized here. The domain is countable with measurable singletons, as in VCUniformConvergence.lean; distributions given as probability mass functions on a countable type are covered through PMF.toMeasure.

Main definitions #

Main results #

References #

The sequence S is an ε-approximation for the class G under the measure μ: for every g ∈ G, the fraction of the points of S at which g is true differs from μ {g = true} by less than ε [MoranYehudayoff2016, Theorem 2.1].

theorem Cslib.MachineLearning.PACLearning.measure_pi_not_isEpsApprox_le_of_uniformConvergenceSampleSize_le {Z : Type u_1} [MeasurableSpace Z] [MeasurableSingletonClass Z] [Countable Z] (μ : MeasureTheory.Measure Z) [MeasureTheory.IsProbabilityMeasure μ] {G : ConceptClass Z Bool} {d : ℕ} (hG : ∀ (W : Finset Z), SetShatters G ↑W → W.card ≤ d) {m : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hε10 : ε ≤ 10) (hδ : 0 < δ) (hm : uniformConvergenceSampleSize d ε δ ≤ ↑m) :
(MeasureTheory.Measure.pi fun (x : Fin m) => μ) {S : Fin m → Z | ¬IsEpsApprox μ G ε S} ≤ ENNReal.ofReal δ

On a countable domain, if every finite set shattered by G has at most d points, then m i.i.d. samples from μ fail to be an ε-approximation for G with probability at most δ once m ≥ (16 / ε²) (2 d log (10 / ε) + log (4 / δ)).

theorem Cslib.MachineLearning.PACLearning.exists_isEpsApprox_of_uniformConvergenceSampleSize_le {Z : Type u_1} [MeasurableSpace Z] [MeasurableSingletonClass Z] [Countable Z] (μ : MeasureTheory.Measure Z) [MeasureTheory.IsProbabilityMeasure μ] {G : ConceptClass Z Bool} {d : ℕ} (hG : ∀ (W : Finset Z), SetShatters G ↑W → W.card ≤ d) {m : ℕ} {ε δ : ℝ} (hε : 0 < ε) (hε10 : ε ≤ 10) (hδ : 0 < δ) (hδ1 : δ < 1) (hm : uniformConvergenceSampleSize d ε δ ≤ ↑m) :
∃ (S : Fin m → Z), IsEpsApprox μ G ε S

ε-approximations for classes of finite VC dimension on a countable domain [VapnikChervonenkis1971; MoranYehudayoff2016, Theorem 2.1, with the weaker size O(d log (1 / ε) / ε²)]: if every finite set shattered by G has at most d points, then every probability measure μ has an ε-approximation for G with m points whenever m ≥ (16 / ε²) (2 d log (10 / ε) + log (4 / δ)) for some δ < 1.