# 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 to know photocatalytic properties of tio2 nanoparticles...what to do now
Akash Reply
it is a goid question and i want to know the answer as well
Maciej
Do somebody tell me a best nano engineering book for beginners?
s. Reply
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Abhijith Reply
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
so some one know about replacing silicon atom with phosphorous in semiconductors device?
s. Reply
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
SUYASH Reply
for screen printed electrodes ?
SUYASH
What is lattice structure?
s. Reply
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
Sanket Reply
what's the easiest and fastest way to the synthesize AgNP?
Damian Reply
China
Cied
types of nano material
abeetha Reply
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.
Ramkumar Reply
what is nano technology
Sravani Reply
what is system testing?
AMJAD
preparation of nanomaterial
Victor Reply
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
Himanshu Reply
good afternoon madam
AMJAD
what is system testing
AMJAD
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
Prasenjit Reply
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!
QuizOver.com Reply

### Read also:

#### Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Statistical learning theory. OpenStax CNX. Apr 10, 2009 Download for free at http://cnx.org/content/col10532/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Statistical learning theory' conversation and receive update notifications?

 By By By By