In
Vapnik–Chervonenkis theory
Vapnik–Chervonenkis theory (also known as VC theory) was developed during 1960–1990 by Vladimir Vapnik and Alexey Chervonenkis. The theory is a form of computational learning theory, which attempts to explain the learning process from a stat ...
, the Vapnik–Chervonenkis (VC) dimension is a measure of the size (capacity, complexity, expressive power, richness, or flexibility) of a class of sets. The notion can be extended to classes of binary functions. It is defined as the
cardinality
The thumb is the first digit of the hand, next to the index finger. When a person is standing in the medical anatomical position (where the palm is facing to the front), the thumb is the outermost digit. The Medical Latin English noun for thum ...
of the largest set of points that the algorithm can
shatter, which means the algorithm can always learn a perfect classifier for any labeling of at least one configuration of those data points. It was originally defined by
Vladimir Vapnik and
Alexey Chervonenkis.
Informally, the capacity of a classification model is related to how complicated it can be. For example, consider the
thresholding of a high-
degree polynomial
In mathematics, a polynomial is a Expression (mathematics), mathematical expression consisting of indeterminate (variable), indeterminates (also called variable (mathematics), variables) and coefficients, that involves only the operations of addit ...
: if the polynomial evaluates above zero, that point is classified as positive, otherwise as negative. A high-degree polynomial can be wiggly, so that it can fit a given set of training points well. But one can expect that the classifier will make errors on other points, because it is too wiggly. Such a polynomial has a high capacity. A much simpler alternative is to threshold a linear function. This function may not fit the training set well, because it has a low capacity. This notion of capacity is made rigorous below.
Definitions
VC dimension of a set-family
Let
be a
family of sets
In set theory and related branches of mathematics, a family (or collection) can mean, depending upon the context, any of the following: set, indexed set, multiset, or class. A collection F of subsets of a given set S is called a family of su ...
(also called set family, collection of sets or set of sets) and
a set. Their ''intersection'' is defined as the following set family:
:
Here typically
and each
are subsets of a big "universe" of possibilities
where intersection takes place.
We say that a set
is ''
shattered'' by
if
i.e. the set of intersections contains (hence is equal to) all the subsets of
. For finite sets
this is equivalent to
:
The ''VC dimension''
of
is the
cardinality
The thumb is the first digit of the hand, next to the index finger. When a person is standing in the medical anatomical position (where the palm is facing to the front), the thumb is the outermost digit. The Medical Latin English noun for thum ...
of the largest set that is shattered by
. If arbitrarily large sets can be shattered, the VC dimension of
is
.
VC dimension of a classification model
A binary classification model
with some parameter vector
is said to ''
shatter'' a set of
generally positioned data points
if, for every assignment of labels to those points, there exists a
such that the model
makes no errors when evaluating that set of data points.
The VC dimension of a model
is the maximum number of points that can be arranged so that
shatters them. More formally, it is the maximum cardinal
such that there exists a generally positioned data point set of
cardinality
The thumb is the first digit of the hand, next to the index finger. When a person is standing in the medical anatomical position (where the palm is facing to the front), the thumb is the outermost digit. The Medical Latin English noun for thum ...
that can be shattered by
.
Examples
#
is a constant classifier (with no parameters); Its VC dimension is 0 since it cannot shatter even a single point. In general, the VC dimension of a finite classification model, which can return at most
different classifiers, is at most
(this is an upper bound on the VC dimension; the
Sauer–Shelah lemma
In combinatorial mathematics and extremal set theory, the Sauer–Shelah lemma states that every family of sets with small VC dimension consists of a small number of sets. It is named after Norbert Sauer and Saharon Shelah, who published it inde ...
gives a lower bound on the dimension).
#
is a single-parametric threshold classifier on real numbers; i.e., for a certain threshold
, the classifier
returns 1 if the input number is larger than
and 0 otherwise. The VC dimension of
is 1 because: (a) It can shatter a single point. For every point
, a classifier
labels it as 0 if
and labels it as 1 if