VC Dimension for Concept Classes #
This file defines shattering and the Vapnik-Chervonenkis dimension for
binary concept classes C : ConceptClass α Bool, i.e. sets of α → Bool
classifiers. Each Boolean classifier c is identified with the subset
c ⁻¹' {true} ⊆ α (the "positive set"), and C shatters a set W if every
subset of W can be obtained as the positive set of some c ∈ C intersected
with W. See also the Finset-based definitions in
Mathlib.Combinatorics.SetFamily.Shatter.
Main definitions #
SetShatters C W: the concept classCshatters the setW.vcDim C: the VC dimension ofC, i.e. the supremum of the cardinalities of finite sets shattered byC.
Main statements #
SetShatters.subset: shattering is anti-monotone in the shattered set.SetShatters.superset: shattering is monotone in the concept class.Finset.Shatters.toSetShatters: bridge from Mathlib'sFinset.ShatterstoSetShatters.
References #
A binary concept class C shatters a set W if for every subset W' ⊆ W,
there exists a concept c ∈ C whose positive set c ⁻¹' {true} intersects W
in exactly W'.
Equations
Instances For
Shattering is anti-monotone in the shattered set: if C shatters W and
V ⊆ W, then C shatters V.
Shattering is monotone in the concept class: if C shatters W and C ⊆ C',
then C' shatters W.
If a finite set family 𝒜 shatters a finite set s in the sense of Mathlib's
Finset.Shatters, then the concept class of characteristic functions of sets in 𝒜
shatters ↑s in the sense of SetShatters. This bridges Mathlib's finset-based
shattering to the predicate used by the PAC learning lower bounds.
The Vapnik-Chervonenkis dimension of a binary concept class C is the
supremum of the cardinalities of finite sets shattered by C. Returns 0 when
no finite set is shattered (i.e. the defining set is empty).
Caveat: because sSup on ℕ returns 0 for unbounded sets, this definition
is only meaningful when the VC dimension is finite — see HasFiniteVCDim.
Equations
Instances For
A binary concept class C has finite VC dimension if there is a uniform
upper bound on the cardinalities of finite sets it shatters. This is the
hypothesis under which vcDim C is mathematically meaningful (otherwise
vcDim returns 0 for unbounded shattered families via sSup on ℕ).
Equations
Instances For
A class has finite VC dimension iff there is a uniform bound on the cardinality of every shattered finite set.