Documentation

CslibFrontier.MachineLearning.PACLearning.DualVCDimension

The dual class and Assouad's dual VC bound #

The dual class of a binary concept class C on α is the class on the concepts of C (dualClass C : ConceptClass ↥C Bool) whose members are the evaluations c ↦ c x, one for each point x : α. If C is drawn as a binary matrix with a row for each concept and a column for each point, the dual class consists of the columns.

Assouad's dual VC bound [Assouad1983; MoranYehudayoff2016, Claim 1.5] says that if every finite set shattered by C has at most d points, then every finite family of concepts shattered by the dual class has fewer than 2 ^ (d + 1) members. Mathlib proves this for finite set families (Finset.vcDim_dualFamily_le). The proof here reduces to Mathlib's bitstring-coding lemma (Finset.exists_shatters_of_dualFamily_shatters). It traces the concepts of a shattered family on a finite set of witness points, one for each subfamily.

The dual class enters the Moran–Yehudayoff compression scheme through classes of the form {g ∘ φ | g ∈ G}, which test a learned hypothesis φ r at a point. A set shattered by such a class is mapped injectively by φ onto a set shattered by G (SetShatters.injOn_of_comp, SetShatters.image_of_comp), so the size bounds of G transfer (SetShatters.card_le_of_comp).

Main definitions #

Main results #

References #

Shattering through a map #

theorem Cslib.MachineLearning.PACLearning.SetShatters.injOn_of_comp {ι : Type u_1} {κ : Type u_2} {G : ConceptClass κ Bool} {φ : ι → κ} {W : Set ι} (hW : SetShatters ((fun (g : κ → Bool) => g ∘ φ) '' G) W) :

If the precomposed class {g ∘ φ | g ∈ G} shatters W, then φ is injective on W: two points of W with the same image receive the same label from every concept of the class, so no concept separates them.

theorem Cslib.MachineLearning.PACLearning.SetShatters.image_of_comp {ι : Type u_1} {κ : Type u_2} {G : ConceptClass κ Bool} {φ : ι → κ} {W : Set ι} (hW : SetShatters ((fun (g : κ → Bool) => g ∘ φ) '' G) W) :
SetShatters G (φ '' W)

If the precomposed class {g ∘ φ | g ∈ G} shatters W, then G shatters φ '' W.

theorem Cslib.MachineLearning.PACLearning.SetShatters.card_le_of_comp {ι : Type u_1} {κ : Type u_2} {G : ConceptClass κ Bool} {d : ℕ} (hG : ∀ (V : Finset κ), SetShatters G ↑V → V.card ≤ d) {φ : ι → κ} {W : Finset ι} (hW : SetShatters ((fun (g : κ → Bool) => g ∘ φ) '' G) ↑W) :
W.card ≤ d

A bound on the finite sets shattered by G bounds the finite sets shattered by the precomposed class {g ∘ φ | g ∈ G}.

The dual class #

The dual class of C: the binary concepts on the concepts of C that evaluate at a point x, c ↦ c x.

theorem Cslib.MachineLearning.PACLearning.mem_dualClass {α : Type u_3} {C : ConceptClass α Bool} {g : ↑C → Bool} :
g ∈ dualClass C ↔ ∃ (x : α), (fun (c : ↑C) => ↑c x) = g
theorem Cslib.MachineLearning.PACLearning.card_le_of_setShatters_dualClass {α : Type u_3} {C : ConceptClass α Bool} {d : ℕ} (hC : ∀ (W : Finset α), SetShatters C ↑W → W.card ≤ d) {F : Finset ↑C} (hF : SetShatters (dualClass C) ↑F) :
F.card ≤ 2 ^ (d + 1) - 1

Assouad's dual VC bound [Assouad1983; MoranYehudayoff2016, Claim 1.5]: if every finite set shattered by C has at most d points, then every finite family of concepts shattered by the dual class has at most 2 ^ (d + 1) - 1 members.

If C has finite VC dimension, so does its dual class.

Assouad's dual VC bound for vcDim: the dual class of a class of finite VC dimension d has VC dimension at most 2 ^ (d + 1) - 1.