# 0.18 The vapnik-chervonenkis inequality

 Page 1 / 1

## The vapnik-chervonenkis inequality

The VC inequality is a powerful generalization of the bounds we obtained for the hyperplane classifier in the previous lecture . The basic idea of the proof is quite similar. Before starting the inequality, we need to introduce theconcept of shatter coefficients and VC dimension.

## Shatter coefficients

Let $\mathcal{A}$ be a collection of subsets of ${\mathcal{R}}^{d}$ , definition: The ${n}^{th}$ shatter coefficient of $\mathcal{A}$ is defined by

${\mathcal{S}}_{\mathcal{A}}\left(n\right)=\begin{array}{c}max\\ {x}_{1},...,{x}_{n}\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}{\mathcal{R}}^{d}\end{array}\left|\left\{,\left\{{x}_{1},...,{x}_{n}\right\},\bigcap ,A,,,A,\phantom{\rule{0.166667em}{0ex}},ϵ,\phantom{\rule{0.166667em}{0ex}},\mathcal{A},\right\}\right|.$

The shatter coefficients are a measure of the richness of the collection $\mathcal{A}$ . ${\mathcal{S}}_{\mathcal{A}}\left(n\right)$ is the largest number of different subsets of a set of $n$ points that can be generated by intersecting the set with elements of $\mathcal{A}$ .

In 1-d, Let $\mathcal{A}=\left\{\left(-,\infty ,,,t\right],t\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}\mathcal{R}\right\}$ Possible subsets of $\left\{{x}_{1},...,{x}_{n}\right\}$ generated by intersecting with sets of the form $\left(-,\infty ,,,t\right]$ are $\left\{{x}_{1},...,{x}_{n}\right\},\phantom{\rule{0.166667em}{0ex}}\left\{{x}_{1},\phantom{\rule{0.166667em}{0ex}}...,{x}_{n-1}\right\},\phantom{\rule{0.166667em}{0ex}}...,\phantom{\rule{0.166667em}{0ex}}\left\{{x}_{1}\right\},\phantom{\rule{0.166667em}{0ex}}\phi$ . Hence ${\mathcal{S}}_{d}\left(n\right)=n+1$ .

In 2-d, Let $\mathcal{A}$ = $\left\{$ all rectangles in ${\mathcal{R}}^{2}$ $\right\}$

Consider a set $\left\{{x}_{1},\phantom{\rule{0.166667em}{0ex}}{x}_{2},\phantom{\rule{0.166667em}{0ex}}{x}_{3},\phantom{\rule{0.166667em}{0ex}}{x}_{4}\right\}$ of training points. If we arrange the four points into the corner of a diamond shape. It's easyto see that we can find a rectangle in ${\mathcal{R}}^{2}$ to cover any subsets of the four points as the above picture, i.e. ${\mathcal{S}}_{\mathcal{A}}\left(4\right)={2}^{4}=16$ .

Clearly, ${\mathcal{S}}_{\mathcal{A}}\left(n\right)={2}^{n},n=1,\phantom{\rule{0.166667em}{0ex}}2,\phantom{\rule{0.166667em}{0ex}}3$ as well.

However, for $n=5,{\mathcal{S}}_{\mathcal{A}}\left(n\right)<{2}^{5}$ . This is because we can always select four points such that the rectangle, which just contains fourof them, contains the other point. Consequently, we cannot find a rectangle classifier which contains the four outer points and does not contain the innerpoint as shown above.

Note the ${\mathcal{S}}_{\mathcal{A}}\le {2}^{n}$ .

If $\left|\left\{,\left\{{x}_{1},...,{x}_{n}\right\},\bigcap ,A,,,A,\phantom{\rule{0.166667em}{0ex}},ϵ,\phantom{\rule{0.166667em}{0ex}},\mathcal{A},\right\}\right|={2}^{n}$ then we say that $\mathcal{A}$ shatters ${x}_{1},\phantom{\rule{0.166667em}{0ex}}...,\phantom{\rule{0.166667em}{0ex}}{x}_{n}$ .

## Vc dimension

The VC dimension
${V}_{\mathcal{A}}$ of a collection of sets $\mathcal{A}$ is defined as the largest interger $n$ such that ${S}_{\mathcal{A}}\left(n\right)={2}^{n}$ .

## Sauer's lemma:

Let $\mathcal{A}$ be a collection of set with VC dimension ${V}_{\mathcal{A}}<\infty$ . Then $\forall n,{\mathcal{S}}_{\mathcal{A}}\left(n\right)\le {\sum }_{i=0}^{{V}_{\mathcal{A}}}\left(\begin{array}{c}n\\ i\end{array}\right)$ , also ${\mathcal{S}}_{\mathcal{A}}\left(n\right)\le {\left(n+1\right)}^{{V}_{\mathcal{A}}},\forall n$ .

## Vc dimension and classifiers

Let $\mathcal{F}$ be a collection of classifiers of the form $f:{\mathcal{R}}^{d}\to \left\{0,1\right\}$ Define $\mathcal{A}=\left\{\left\{x:f\left(x\right)=1\right\}×\left\{0\right\}\bigcup \left\{x:f\left(x\right)=0\right\}×\left\{1\right\},f\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}\mathcal{F}\right\}$ In words, this is collection of subsets of $\mathcal{X}×\mathcal{Y}$ for which on $fϵ\mathcal{F}$ maps the features $x$ to a label opposite of $y$ .  The size of $\mathcal{A}$ expresses the richness of $\mathcal{F}$ .  The larger $\mathcal{A}$ is the more likely it is that there exists an $fϵ\mathcal{F}$ for which $R\left(f\right)=P\left(f\left(X\right)\ne Y\right)$ is close to the Bayes risk ${R}^{*}=P\left({f}^{*}\left(X\right)\ne Y\right)$ where ${f}^{*}$ is the Bayes classifier. The ${n}^{th}$ shatter coefficient of $\mathcal{F}$ is defined as ${\mathcal{S}}_{\mathcal{F}}\left(n\right)={\mathcal{S}}_{\mathcal{A}}\left(n\right)$ and the VC dimesion of $\mathcal{F}$ is defined as ${V}_{\mathcal{F}}={V}_{\mathcal{A}}$ .

linear (hyperplane) classifiers in ${\mathcal{R}}^{d}$

Consider $d$ = 2. Let $n$ be the number of training points, it is easy to see that when $n=1$ , let $\mathcal{A}$ be as above. By using linear classifiers in ${\mathcal{R}}^{2}$ , it is easy to see that we can assign 1 to all possible subsets $\left\{\left\{{x}_{1}\right\},\phi \right\}$ and 0 to their complements. Hence ${\mathcal{S}}_{\mathcal{F}}\left(1\right)=2$ .

When $n=2$ , we can also assign 1 to all possible subsets $\left\{\left\{{x}_{1},{x}_{2}\right\},\phantom{\rule{0.166667em}{0ex}}\left\{{x}_{1}\right\},\phantom{\rule{0.166667em}{0ex}}\left\{{x}_{2}\right\},\phantom{\rule{0.166667em}{0ex}}\phi \right\}$ and 0 to their complements, and vice versa. Hence ${\mathcal{S}}_{\mathcal{F}}\left(2\right)=4={2}^{2}$ .

When $n=3$ , we can arrange arrange the point ${x}_{1},\phantom{\rule{0.166667em}{0ex}}{x}_{2},\phantom{\rule{0.166667em}{0ex}}{x}_{3}$ (non-colinear) so that the set of linear classifiers shatters the three points, hence ${\mathcal{S}}_{\mathcal{F}}\left(3\right)=8={2}^{3}$

When $n=4$ , no matter where the points ${x}_{1},\phantom{\rule{0.166667em}{0ex}}{x}_{2},\phantom{\rule{0.166667em}{0ex}}{x}_{3},\phantom{\rule{0.166667em}{0ex}}{x}_{4}$ and what designated binary values ${y}_{1},\phantom{\rule{0.166667em}{0ex}}{y}_{2},\phantom{\rule{0.166667em}{0ex}}{y}_{3},\phantom{\rule{0.166667em}{0ex}}{y}_{4}$ are. It's clear that $\mathcal{A}$ does not shatter the four points. To see the claim, first observe that the four points will form a 4-gon (if the four points are co-linear, or if the three points are co-linear then clearly linear classifiers cannot shatter the points). The two points that belong to the same diagonal lines form 2 groups and no linear classifier can assign different values to the 2 groups. Hence ${\mathcal{S}}_{\mathcal{F}}\left(4\right)<16={2}^{4}$ and ${V}_{\mathcal{F}}=3$ .

We state here without proving it that in general the class of linear classifiers in ${\mathcal{R}}^{d}$ has ${V}_{\mathcal{F}}=d+1$ .

## The vc inequality

Let ${X}_{1},\phantom{\rule{0.166667em}{0ex}},...,\phantom{\rule{0.166667em}{0ex}}{X}_{n}$ be i.i.d. ${\mathcal{R}}^{d}$ -valued random variables. Denote the common distribution of ${X}_{i},1\le i\le n$ by $\mu \left(A\right)=P\left({X}_{1}\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}A\right)$ for any subset $A\subset {\mathcal{R}}^{d}$ . Similarly, define the empirical distribution ${\mu }_{n}\left(A\right)=\frac{1}{n}{\sum }_{1}^{n}{1}_{\left\{{X}_{i}ϵA\right\}}$ .

Theorem

## Vc '71

For any probablilty measure $\mu$ and collection of subsets $\mathcal{A}$ , and for any $ϵ>0$ .

$P\left(\begin{array}{c}sup\\ Aϵ\mathcal{A}\end{array},\left|{\mu }_{n},\left(A\right),-,\mu ,\left(A\right)\right|,>,ϵ\right)\le 8{\mathcal{S}}_{\mathcal{A}}\left(n\right){e}^{-n{ϵ}^{2}/32}$

and

$E\left[\begin{array}{c}sup\\ Aϵ\mathcal{A}\end{array},\left|{\mu }_{n},\left(A\right),-,\mu ,\left(A\right)\right|\right]\le 2\sqrt{\frac{log2{\mathcal{S}}_{\mathcal{A}}\left(n\right)}{n}}$

Before giving a proof to the theorem. We present a Corollary.

Corollary

Let $\mathcal{F}$ be a collection of classifiers of the form $f:{\mathcal{R}}^{d}\to \left\{0,1\right\}$ with VC dimension ${V}_{\mathcal{F}}<\infty$ ,  Let $R\left(f\right)=P\left(f\left(X\right)\ne Y\right)$ and ${\stackrel{^}{R}}_{n}\left(f\right)=\frac{1}{n}{\sum }_{1}^{n}{1}_{\left\{f\left({X}_{i}\right)\ne {Y}_{i}\right\}}$ , where ${X}_{i},{Y}_{i},1\le i\le n$ are i.i.d. with joint distribution ${P}_{XY}$ .

Define

${\stackrel{^}{f}}_{n}=\begin{array}{c}argmin\\ fϵ\mathcal{F}\end{array}{\stackrel{^}{R}}_{n}\left(f\right)$ .

Then

$E\left[R\left({\stackrel{^}{f}}_{n}\right)\right]-\begin{array}{c}inf\\ fϵ\mathcal{F}\end{array}R\left(f\right)\le 4\sqrt{\frac{{\mathcal{V}}_{\mathcal{F}}log\left(n,+,1\right)+log2}{n}}.$

Let $\mathcal{A}=\left\{\left\{x:f\left(x\right)=1\right\}×\left\{0\right\}\bigcup \left\{x:f\left(x\right)=0\right\}×\left\{1\right\},f\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}\mathcal{F}\right\}$

Note that

$P\left(f\left(X\right)\ne Y\right)=P\left(\left(X,Y\right)\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}A\right):=\mu \left(A\right)$

where $A=\left\{x:f\left(x\right)=1\right\}×\left\{0\right\}\bigcup \left\{x:f\left(x\right)=0\right\}×\left\{1\right\}$ .

Similarly,

$\frac{1}{n}\sum _{1}^{n}{1}_{\left\{f\left({X}_{i}\right)\phantom{\rule{0.166667em}{0ex}}\ne \phantom{\rule{0.166667em}{0ex}}{Y}_{i}\right\}}=\frac{1}{n}\sum _{1}^{n}{1}_{\left\{\left({X}_{i},{Y}_{i}\right)\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}A\right\}}:=\mu \left(A\right).$

Therefore, according to the VC theorem.

$\begin{array}{ccc}\hfill E\left[\begin{array}{c}sup\\ f\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}\mathcal{F}\end{array},\left|{\stackrel{^}{R}}_{n},\left(f\right),-,R,\left(f\right)\right|\right]=E\left[\begin{array}{c}sup\\ A\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}\mathcal{A}\end{array},\left|{\mu }_{n},\left(A\right),-,\mu ,\left(A\right)\right|\right]& \le & 2\sqrt{\frac{log2{\mathcal{S}}_{\mathcal{A}}\left(n\right)}{n}}\hfill \\ & =& 2\sqrt{\frac{log2{\mathcal{S}}_{\mathcal{F}}\left(n\right)}{n}}\hfill \end{array}$

Since ${V}_{\mathcal{F}}<\infty ,{\mathcal{S}}_{\mathcal{F}}\left(n\right)\le {\left(n+1\right)}^{{V}_{\mathcal{F}}}$ and

$E\left[\begin{array}{c}sup\\ fϵ\mathcal{F}\end{array},\left|{\stackrel{^}{R}}_{n},\left(f\right),-,R,\left(f\right)\right|\right]\le 2\sqrt{\frac{{V}_{\mathcal{F}}log\left(n+1\right)+log2}{n}}.$

Next, note that

$\begin{array}{ccc}\hfill R\left({\stackrel{^}{f}}_{n}\right)-\begin{array}{c}inf\\ f\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}\mathcal{F}\end{array}R\left(f\right)& =& \left[R,\left({\stackrel{^}{f}}_{n}\right),-,{\stackrel{^}{R}}_{n},\left({\stackrel{^}{f}}_{n}\right)\right]+\left[{\stackrel{^}{R}}_{n},\left({\stackrel{^}{f}}_{n}\right),-,\begin{array}{c}inf\\ f\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}\mathcal{F}\end{array},R,\left(f\right)\right]\hfill \\ & =& \left[R,\left({\stackrel{^}{f}}_{n}\right),-,{\stackrel{^}{R}}_{n},\left({\stackrel{^}{f}}_{n}\right)\right]+\left[\begin{array}{c}sup\\ f\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}\mathcal{F}\end{array},\left({\stackrel{^}{R}}_{n},\left({\stackrel{^}{f}}_{n}\right),-,R,\left(f\right)\right)\right]\hfill \\ & \le & \left[R,\left({\stackrel{^}{f}}_{n}\right),-,{\stackrel{^}{R}}_{n},\left({\stackrel{^}{f}}_{n}\right)\right]+\left[\begin{array}{c}sup\\ f\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}\mathcal{F}\end{array},\left({\stackrel{^}{R}}_{n},\left(f\right),-,R,\left(f\right)\right)\right]\hfill \\ & \le & 2\begin{array}{c}sup\\ f\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}\mathcal{F}\end{array}\left|{\stackrel{^}{R}}_{n},\left(f\right),-,R,\left(f\right)\right|\hfill \end{array}.$

Therefore,

$\begin{array}{ccc}\hfill E\left[R,\left({\stackrel{^}{f}}_{n}\right)\right]-\begin{array}{c}inf\\ f\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}\mathcal{F}\end{array}R\left(f\right)& \le & 2E\left[\begin{array}{c}sup\\ f\phantom{\rule{0.166667em}{0ex}}ϵ\phantom{\rule{0.166667em}{0ex}}\mathcal{F}\end{array},\left|{\stackrel{^}{R}}_{n},\left(f\right),-,R,\left(f\right)\right|\right]\hfill \\ & \le & 4\sqrt{\frac{{V}_{\mathcal{F}}log\left(n+1\right)+log2}{n}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\hfill \end{array}.$

#### Questions & Answers

how do they get the third part x = (32)5/4
can someone help me with some logarithmic and exponential equations.
sure. what is your question?
20/(×-6^2)
Salomon
okay, so you have 6 raised to the power of 2. what is that part of your answer
I don't understand what the A with approx sign and the boxed x mean
it think it's written 20/(X-6)^2 so it's 20 divided by X-6 squared
Salomon
I'm not sure why it wrote it the other way
Salomon
I got X =-6
Salomon
ok. so take the square root of both sides, now you have plus or minus the square root of 20= x-6
oops. ignore that.
so you not have an equal sign anywhere in the original equation?
Commplementary angles
hello
Sherica
im all ears I need to learn
Sherica
right! what he said ⤴⤴⤴
Tamia
hii
Uday
what is a good calculator for all algebra; would a Casio fx 260 work with all algebra equations? please name the cheapest, thanks.
a perfect square v²+2v+_
kkk nice
algebra 2 Inequalities:If equation 2 = 0 it is an open set?
or infinite solutions?
Kim
The answer is neither. The function, 2 = 0 cannot exist. Hence, the function is undefined.
Al
y=10×
if |A| not equal to 0 and order of A is n prove that adj (adj A = |A|
rolling four fair dice and getting an even number an all four dice
Kristine 2*2*2=8
Differences Between Laspeyres and Paasche Indices
No. 7x -4y is simplified from 4x + (3y + 3x) -7y
is it 3×y ?
J, combine like terms 7x-4y
how do you translate this in Algebraic Expressions
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
types of nano material
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
I'm interested in nanotube
Uday
what is nanomaterials​ and their applications of sensors.
what is nano technology
what is system testing?
preparation of nanomaterial
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
what is system testing
what is the application of nanotechnology?
Stotaw
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
Azam
anybody can imagine what will be happen after 100 years from now in nano tech world
Prasenjit
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
Azam
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
Prasenjit
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
Damian
silver nanoparticles could handle the job?
Damian
not now but maybe in future only AgNP maybe any other nanomaterials
Azam
Hello
Uday
I'm interested in Nanotube
Uday
this technology will not going on for the long time , so I'm thinking about femtotechnology 10^-15
Prasenjit
can nanotechnology change the direction of the face of the world
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
the Beer law works very well for dilute solutions but fails for very high concentrations. why?
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!