The VC dimension of halfspaces #
For a linear map Φ : V →ₗ[ℝ] α → ℝ from a real vector space of parameters to real functions on
α, positivityClass Φ is the binary class {x ↦ decide (0 < Φ v x) : v ∈ V}. If V is
finite-dimensional, no set of more than finrank ℝ V points is shattered
(card_le_finrank_of_setShatters_positivityClass): the evaluation functionals at such points are
linearly dependent in the dual space, and labelling the points with positive coefficients true
makes the vanishing combination strictly positive. If the parameters can realize every real
vector of values at finrank ℝ V distinct points, those points are shattered, and the VC dimension
equals finrank ℝ V (vcDim_positivityClass_eq). This is the argument of
[ShalevShwartzBenDavid2014, Theorem 9.2] for an arbitrary finite-dimensional family of linear
functionals.
Instances:
- homogeneous halfspaces
x ↦ decide (0 < w ⬝ᵥ x)inFin d → ℝhave VC dimensiond[ShalevShwartzBenDavid2014, Theorem 9.2], shattering the standard basis; - affine halfspaces
x ↦ decide (0 < w ⬝ᵥ x + b)have VC dimensiond + 1[ShalevShwartzBenDavid2014, Theorem 9.3], shattering0and the standard basis.
The source writes halfspaces as sign (⟪w, x⟫ + b); here a point is labelled true exactly when
the value is strictly positive, as in the perceptron
(CslibFrontier.MachineLearning.OnlineLearning.MistakeBound.Perceptron). The upper bound holds for
this convention without any general-position assumption.
Main definitions #
Cslib.MachineLearning.PACLearning.positivityClass: the positivity sets of a linear family.Cslib.MachineLearning.PACLearning.homogeneousHalfspaces,Cslib.MachineLearning.PACLearning.affineHalfspaces: halfspaces inFin d → ℝ.
Main results #
Cslib.MachineLearning.PACLearning.card_le_finrank_of_setShatters_positivityClass,Cslib.MachineLearning.PACLearning.vcDim_positivityClass_le: at mostfinrank ℝ Vpoints are shattered.Cslib.MachineLearning.PACLearning.setShatters_positivityClass_range: points at which every vector of values is realized are shattered.Cslib.MachineLearning.PACLearning.vcDim_positivityClass_eq: the VC dimension isfinrank ℝ Vwhenfinrank ℝ Vpoints admit all values.Cslib.MachineLearning.PACLearning.vcDim_homogeneousHalfspaces,Cslib.MachineLearning.PACLearning.vcDim_affineHalfspaces: the valuesdandd + 1.
References #
- S. Shalev-Shwartz, S. Ben-David, Understanding Machine Learning: From Theory to Algorithms, Section 9.1.3, Theorems 9.2 and 9.3
The positivity class of a linear family Φ : V →ₗ[ℝ] α → ℝ: the classifiers
x ↦ decide (0 < Φ v x) for v : V.
No more than finrank ℝ V points are shattered by the positivity class of a linear family
on a finite-dimensional parameter space.
Points at which the parameters realize every vector of real values are shattered.
The positivity class of a linear family on a finite-dimensional space has finite VC dimension.
The VC dimension of the positivity class is at most finrank ℝ V.
The VC dimension of the positivity class is finrank ℝ V when finrank ℝ V distinct points
admit every vector of values.
Homogeneous halfspaces in Fin d → ℝ: the classifiers x ↦ decide (0 < w ⬝ᵥ x).
Affine halfspaces in Fin d → ℝ: the classifiers x ↦ decide (0 < w ⬝ᵥ x + b).
Homogeneous halfspaces as the positivity class of homogeneousForm, for applying the general
positivityClass results.
Affine halfspaces as the positivity class of affineForm, for applying the general
positivityClass results.
The VC dimension of homogeneous halfspaces in Fin d → ℝ is d
[ShalevShwartzBenDavid2014, Theorem 9.2].
The VC dimension of affine halfspaces in Fin d → ℝ is d + 1
[ShalevShwartzBenDavid2014, Theorem 9.3].