Shattering families #
This file defines the shattering property and VC-dimension of set families.
Main declarations #
Finset.Shatters
: The shattering property.Finset.shatterer
: The set family of sets shattered by a set family.Finset.vcDim
: The Vapnik-Chervonenkis dimension.
TODO #
- Order-shattering
- Strong shattering
A set family 𝒜
shatters a set s
if all subsets of s
can be obtained as the intersection
of s
and some element of the set family, and we denote this 𝒜.Shatters s
. We also say that s
is traced by 𝒜
.
Instances For
theorem
Finset.Shatters.mono_left
{α : Type u_1}
[DecidableEq α]
{𝒜 ℬ : Finset (Finset α)}
{s : Finset α}
(h : 𝒜 ⊆ ℬ)
(h𝒜 : 𝒜.Shatters s)
:
ℬ.Shatters s
theorem
Finset.Shatters.mono_right
{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{s t : Finset α}
(h : t ⊆ s)
(hs : 𝒜.Shatters s)
:
𝒜.Shatters t
theorem
Finset.Shatters.exists_superset
{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{s : Finset α}
(h : 𝒜.Shatters s)
:
∃ t ∈ 𝒜, s ⊆ t
theorem
Finset.shatters_of_forall_subset
{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{s : Finset α}
(h : ∀ t ⊆ s, t ∈ 𝒜)
:
𝒜.Shatters s
theorem
Finset.Shatters.nonempty
{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{s : Finset α}
(h : 𝒜.Shatters s)
:
𝒜.Nonempty
@[simp]
The set family of sets that are shattered by 𝒜
.
Equations
- 𝒜.shatterer = Finset.filter (fun (s : Finset α) => 𝒜.Shatters s) (𝒜.biUnion Finset.powerset)
Instances For
theorem
Finset.shatterer_mono
{α : Type u_1}
[DecidableEq α]
{𝒜 ℬ : Finset (Finset α)}
(h : 𝒜 ⊆ ℬ)
:
theorem
Finset.subset_shatterer
{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
(h : IsLowerSet ↑𝒜)
:
@[simp]
@[simp]
@[simp]
theorem
Finset.Shatters.shatterer
{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{s : Finset α}
:
Alias of the reverse direction of Finset.shatters_shatterer
.
Pajor's variant of the Sauer-Shelah lemma.
theorem
Finset.Shatters.of_compression
{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
{s : Finset α}
{a : α}
(hs : (Down.compression a 𝒜).Shatters s)
:
𝒜.Shatters s
theorem
Finset.shatterer_compress_subset_shatterer
{α : Type u_1}
[DecidableEq α]
(a : α)
(𝒜 : Finset (Finset α))
:
Vapnik-Chervonenkis dimension #
The Vapnik-Chervonenkis dimension of a set family is the maximal size of a set it shatters.
Equations
- 𝒜.vcDim = 𝒜.shatterer.sup Finset.card
Instances For
Down-compressing decreases the VC-dimension.
theorem
Finset.card_shatterer_le_sum_vcDim
{α : Type u_1}
[DecidableEq α]
{𝒜 : Finset (Finset α)}
[Fintype α]
:
The Sauer-Shelah lemma.