VC-dimensions of nondeterministic finite automata for words of equal length #
Part 1: Define VC dimension and VC index and prove
`dimVC = indexVC - 1` (even in the case of the empty family)
To make this computable, restrict A ⊆ ⋃ 𝓕
Instances For
Perhaps more natural to say: there is such a set, and 𝓕 shatters them all.
Instances For
Equations
- instDecidableEqFinsetInter_acmoi A B C = decEq (A ∩ C) B
Equations
- instDecidableEqFinset_acmoi 𝓕 𝓖 = decEq 𝓕 𝓖
Equations
- instDecidableExistsFinsetAndMemEqInter_acmoi A B 𝓕 = Multiset.decidableExistsMultiset
Equations
- instDecidableForallForallSubsetFinsetExistsAndMemEqInter_acmoi A 𝓕 = Fintype.decidableForallFintype
Equations
- instDecidableAndEqNatCardForallForallSubsetFinsetExistsMemInter_acmoi A 𝓕 d = instDecidableAnd
Equations
- instDecidableShatters_some 𝓕 d = id Fintype.decidableExistsFintype
Equations
- instDecidableShatters_all 𝓕 d = id Fintype.decidableForallFintype
Shattering some set of size 0 or 1 is equivalent to having cardinality at least 2^0 or 2^1, respectively.
Shattering some set of size 0 or 1 is equivalent to having cardinality at least 2^0 or 2^1, respectively.
The VC dimension of a finite set family.
Equations
- dimVC 𝓕 = if H : 𝓕 = ∅ then 0 else (Finset.filter (shatters_some 𝓕) (Finset.range (Finset.univ.card + 1))).max' ⋯
Instances For
A family can also shatter a smaller set.
Lean 3 version thanks to Adam Topaz.
The VC index is the VC dimension +1 for nonempty finite families, but can be defined for families of all cardinalities.
Equations
- indexVC 𝓕 = if H : shatters_some 𝓕 Finset.univ.card then Finset.univ.card + 1 else (Finset.filter (fun (k : ℕ) => ¬shatters_some 𝓕 k) (Finset.range (Finset.univ.card + 1))).min' ⋯
Instances For
Equations
- indexVC_as_min' 𝓕 = (Finset.filter (fun (k : ℕ) => ¬shatters_some 𝓕 k) (Finset.range (Finset.univ.card + 2))).min' ⋯
Instances For
Kathleen Romanik's testing dimension, index version.
Equations
- indexTest 𝓕 = if hf : ∃ (B : Finset V), B ∉ 𝓕 then (Finset.filter (fun (k : ℕ) => ¬shatters_all 𝓕 k) (Finset.range (Finset.univ.card + 1))).min' ⋯ else Finset.univ.card + 1
Instances For
Kathleen Romanik's testing dimension, Source: Definition 2 of "VC-dimensions of nondeterministic finite automata for words of equal length".
Equations
- dimTest 𝓕 = if H : 𝓕 = ∅ then 0 else let_fun this := ⋯; (Finset.filter (fun (k : ℕ) => shatters_all 𝓕 k) (Finset.range (Finset.univ.card + 1))).max' ⋯
Instances For
The VC dimension of the powerset is the cardinality of the underlying set. Note that this does not require [Nonempty V].