In Vapnik–Chervonenkis theory, 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 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.
[1] Informally, the capacity of a classification model is related to how complicated it can be.
A high-degree polynomial can be wiggly, so 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.
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.
is the cardinality of the largest set that is shattered by
If arbitrarily large sets can be shattered, the VC dimension is
is said to shatter a set of generally positioned data points
makes no errors when evaluating that set of data points[citation needed].
is the maximum number of points that can be arranged so that
such that there exists a generally positioned data point set of cardinality
The VC dimension can predict a probabilistic upper bound on the test error of a classification model.
Vapnik[3] proved that the probability of the test error (i.e., risk with 0–1 loss function) distancing from an upper bound (on data that is drawn i.i.d.
is the VC dimension of the classification model,
is the size of the training set (restriction: this formula is valid when
The VC dimension also appears in sample-complexity bounds.
A space of binary functions with VC dimension
Thus, the sample-complexity is a linear function of the VC dimension of the hypothesis space.
The VC dimension is one of the critical parameters in the size of ε-nets, which determines the complexity of approximation algorithms based on them; range sets without finite VC dimension may not have finite ε-nets at all.
A finite projective plane of order n is a collection of n2 + n + 1 sets (called "lines") over n2 + n + 1 elements (called "points"), for which: The VC dimension of a finite projective plane is 2.
(b) For any triple of three distinct points, if there is a line x that contain all three, then there is no line y that contains exactly two (since then x and y would intersect in two points, which is contrary to the definition of a projective plane).
, is at most:[4]: 108–109 A neural network is described by a directed acyclic graph G(V,E), where: The VC dimension of a neural network is bounded as follows:[4]: 234–235 The VC dimension is defined for spaces of binary functions (functions to {0,1}).
Several generalizations have been suggested for spaces of non-binary functions.