# 0.8 Classification error bounds

 Page 1 / 1

## Recap: classifier design

Given a set of training data ${\left\{{X}_{i},{Y}_{i}\right\}}_{i=1}^{n}$ and a finite collection of candidate functions $\mathcal{F}$ , select ${\stackrel{^}{f}}_{n}\in \mathcal{F}$ that (hopefully) is a good predictor for future cases. That is

$\stackrel{^}{{f}_{n}}=arg\underset{f\in \mathcal{F}}{min}{\stackrel{^}{R}}_{n}\left(f\right)$

where ${\stackrel{^}{R}}_{n}\left(f\right)$ is the empirical risk. For any particular $f\in \mathcal{F}$ , the corresponding empirical risk is defined as

${\stackrel{^}{R}}_{n}\left(f\right)=\frac{1}{n}\sum _{i=1}^{n}{\mathbf{1}}_{\left\{f\left({X}_{i}\right)\ne {Y}_{i}\right\}}.$

## Hoeffding's inequality

Hoeffding's inequality (Chernoff's bound in this case) allows us to gauge how close ${\stackrel{^}{R}}_{n}\left(f\right)$ is to the true risk of $f$ , $R\left(f\right)$ , in probability

$P\left(|{\stackrel{^}{R}}_{n}\left(f\right)-R\left(f\right)|\ge ϵ\right)\le 2{e}^{-2n{ϵ}^{2}}.$

Since our selection process involves deciding among all $f\in \mathcal{F}$ , we would like to gauge how close the empirical risks are to theirexpected values. We can do this by studying the probability that one or more of the empirical risks deviates significantly from itsexpected value. This is captured by the probability

$P\left(\underset{f\in \mathcal{F}}{max},|{\stackrel{^}{R}}_{n}\left(f\right)-R\left(f\right)|\ge ϵ\right).$

Note that the event

$\underset{f\in \mathcal{F}}{max}|{\stackrel{^}{R}}_{n}\left(f\right)-R\left(f\right)|\ge ϵ$

is equivalent to union of the events

$\bigcup _{f\in \mathcal{F}}\left\{|,{\stackrel{^}{R}}_{n},\left(f\right)-R\left(f\right)|\ge ϵ\right\}.$

Therefore, we can use Bonferonni's bound (aka the “union of events” or “union” bound) to obtain

$\begin{array}{ccc}\hfill P\left(\underset{f\in \mathcal{F}}{max},|{\stackrel{^}{R}}_{n}\left(f\right)-R\left(f\right)|\ge ϵ\right)& =& P\left(\bigcup _{f\in \mathcal{F}},|{\stackrel{^}{R}}_{n}\left(f\right)-R\left(f\right)|\ge ϵ\right)\hfill \\ & \le & \sum _{f\in \mathcal{F}}P\left(|{\stackrel{^}{R}}_{n}\left(f\right)-R\left(f\right)|\ge ϵ\right)\hfill \\ & \le & \sum _{f\in \mathcal{F}}2{e}^{-2n{ϵ}^{2}}\hfill \\ & =& 2|\mathcal{F}|{e}^{-2n{ϵ}^{2}}\hfill \end{array}$

where $|\mathcal{F}|$ is the number of classifiers in $\mathcal{F}$ . In the proof of Hoeffding's inequality we also obtained a one-sided inequality thatimplied

$P\left(R\left(f\right)-{\stackrel{^}{R}}_{n}\left(f\right)\ge ϵ\right)\le {e}^{-2n{ϵ}^{2}}$

and hence

$P\left(\underset{f\in \mathcal{F}}{max},\phantom{\rule{0.166667em}{0ex}},R\left(f\right)-{\stackrel{^}{R}}_{n}\left(f\right)\ge ϵ\right)\le |\mathcal{F}|{e}^{-2n{ϵ}^{2}}.$

We can restate the inequality above as follows, For all $f\in \mathcal{F}$ and for all $\delta >0$ with probability at least $1-\delta$

$R\left(f\right)\le {\stackrel{^}{R}}_{n}\left(f\right)+\sqrt{\frac{log|\mathcal{F}|+log\left(1/\delta \right)}{2n}}.$

This follows by setting $\delta =|\mathcal{F}|{e}^{-2n{ϵ}^{2}}$ and solving for $ϵ$ . Thus with a high probability $\left(1-\delta \right)$ , the true risk for all $f\in \mathcal{F}$ is bounded by the empirical risk of $f$ plus a constant that depends on $\delta >0$ , the number of training samples n, and the size $\mathcal{F}$ . Most importantly the bound does not depend on the unknown distribution ${P}_{XY}$ . Therefore, we can call this a distribution-free bound.

## Error bounds

We can use the distribution-free bound above to obtain a bound on the expected performance of the minimum empirical riskclassifier

${\stackrel{^}{f}}_{n}=arg\underset{f\in \mathcal{F}}{min}{\stackrel{^}{R}}_{n}\left(f\right).$

We are interested in bounding

$E\left[R\left({\stackrel{^}{f}}_{n}\right)\right]-\underset{f\in \mathcal{F}}{min}R\left(f\right)$

the expected risk of ${\stackrel{^}{f}}_{n}$ minus the minimum risk for all $f\in \mathcal{F}$ . Note that this difference is always non-negative since ${\stackrel{^}{f}}_{n}$ is at best as good as

${f}^{*}=arg\underset{f\in \mathcal{F}}{min}R\left(f\right).$

Recall that $\forall f\in \mathcal{F}$ and $\forall \delta >0$ , with probability at least $1-\delta$

$R\left(f\right)\le {\stackrel{^}{R}}_{n}\left(f\right)+C\left(\mathcal{F},n,\delta \right)$

where

$C\left(\mathcal{F},n,\delta \right)=\sqrt{\frac{log|\mathcal{F}|+log\left(1/\delta \right)}{2n}}.$

In particular, since this holds for all $f\in \mathcal{F}$ including ${\stackrel{^}{f}}_{n}$ ,

$R\left({\stackrel{^}{f}}_{n}\right)\le {\stackrel{^}{R}}_{n}\left({\stackrel{^}{f}}_{n}\right)+C\left(\mathcal{F},n,\delta \right)$

and for any other $f\in \mathcal{F}$

$R\left({\stackrel{^}{f}}_{n}\right)\le {\stackrel{^}{R}}_{n}\left(f\right)+C\left(\mathcal{F},n,\delta \right)$

since ${\stackrel{^}{R}}_{n}\left({\stackrel{^}{f}}_{n}\right)\le {\stackrel{^}{R}}_{n}\left(f\right)$ $\forall f\in \mathcal{F}$ . In particular,

$R\left({\stackrel{^}{f}}_{n}\right)\le {\stackrel{^}{R}}_{n}\left({f}^{*}\right)+C\left(\mathcal{F},n,\delta \right)$

where ${f}^{*}=arg{min}_{f\in \mathcal{F}}R\left(f\right)$ .

Let $\Omega$ denote the set of events on which the above inequality holds. Then by definition

$P\left(\Omega \right)\ge 1-\delta .$

We can now bound $E\left[R\left({\stackrel{^}{f}}_{n}\right)\right]-R\left({f}^{*}\right)$ as follows

$\begin{array}{ccc}\hfill E\left[R\left({\stackrel{^}{f}}_{n}\right)\right]-R\left({f}^{*}\right)& =& E\left[R\left({\stackrel{^}{f}}_{n}\right)-{\stackrel{^}{R}}_{n}\left({f}^{*}\right)+{\stackrel{^}{R}}_{n}\left({f}^{*}\right)-R\left({f}^{*}\right)\right]\hfill \\ & =& E\left[R\left({\stackrel{^}{f}}_{n}\right)-{\stackrel{^}{R}}_{n}\left({f}^{*}\right)\right]\hfill \end{array}$

since $E\left[{\stackrel{^}{R}}_{n}\left({f}^{*}\right)\right]=R\left({f}^{*}\right)$ . The quantity above is bounded as follows.

$\begin{array}{ccc}\hfill E\left[R\left({\stackrel{^}{f}}_{n}\right)-{\stackrel{^}{R}}_{n}\left({f}^{*}\right)\right]& =& E\left[R\left({\stackrel{^}{f}}_{n}\right)-{\stackrel{^}{R}}_{n}\left({f}^{*}\right)|\Omega \right]\phantom{\rule{0.166667em}{0ex}}P\left(\Omega \right)+E\left[R\left({\stackrel{^}{f}}_{n}\right)-{\stackrel{^}{R}}_{n}\left({f}^{*}\right)|\Omega \right]\phantom{\rule{0.166667em}{0ex}}P\left(\overline{\Omega }\right)\hfill \\ & \le & E\left[R\left({\stackrel{^}{f}}_{n}\right)-{\stackrel{^}{R}}_{n}\left({f}^{*}\right)|\Omega \right]+\delta \hfill \end{array}$

since $P\left(\Omega \right)\le 1$ , $1-P\left(\Omega \right)\le \delta$ and $R\left({\stackrel{^}{f}}_{n}\right)-{\stackrel{^}{R}}_{n}\left({f}^{*}\right)\le 1$

$\begin{array}{ccc}\hfill E\left[R\left({\stackrel{^}{f}}_{n}\right)-{\stackrel{^}{R}}_{n}\left({f}^{*}\right)|\Omega \right]& \le & E\left[R\left({\stackrel{^}{f}}_{n}\right)-{\stackrel{^}{R}}_{n}\left({\stackrel{^}{f}}_{n}\right)|\Omega \right]\hfill \\ & \le & C\left(\mathcal{F},n,\delta \right)\hfill \end{array}.$

Thus

$E\left[R\left({\stackrel{^}{f}}_{n}\right)-{\stackrel{^}{R}}_{n}\left({f}^{*}\right)\right]\le C\left(\mathcal{F},n,\delta \right)+\delta .$

So we have

$E\left[R\left({\stackrel{^}{f}}_{n}\right)\right]-\underset{f\in \mathcal{F}}{min}R\left(f\right)\le \sqrt{\frac{log|\mathcal{F}|+log\left(1/\delta \right)}{2n}}+\delta ,\phantom{\rule{4.pt}{0ex}}\forall \delta >0.$

In particular, for $\delta =\sqrt{1/n}$ , we have

$\begin{array}{ccc}\hfill E\left[R\left({\stackrel{^}{f}}_{n}\right)\right]-\underset{f\in \mathcal{F}}{min}R\left(f\right)& \le & \sqrt{\frac{log|\mathcal{F}|+logn}{2n}}+\frac{1}{\sqrt{n}}\hfill \\ & \le & \sqrt{\frac{log|\mathcal{F}|+logn+2}{n}},\phantom{\rule{4.pt}{0ex}}\phantom{\rule{4.pt}{0ex}}\text{since}\phantom{\rule{4.pt}{0ex}}\phantom{\rule{4.pt}{0ex}}\sqrt{x}+\sqrt{y}\le \sqrt{2}\sqrt{x+y},\phantom{\rule{4pt}{0ex}}\forall \phantom{\rule{4pt}{0ex}}x,y>0\hfill \end{array}.$

## Application: histogram classifier

Let $\mathcal{F}$ be the collection of all classifiers with M equal volume cells. Then $|\mathcal{F}|={2}^{M}$ , and the histogram classification rule

${\stackrel{^}{f}}_{n}=arg\underset{f\in \mathcal{F}}{min}\left(\frac{1}{n},\sum _{i=1}^{n},{1}_{\left\{f\left({X}_{i}\right)\ne {Y}_{i}\right\}}\right)$

satisfies

$E\left[R\left({\stackrel{^}{f}}_{n}\right)\right]-\underset{f\in \mathcal{F}}{min}R\left(f\right)\le \sqrt{\frac{Mlog2+2+logn}{n}}$

which suggests the choice $M={log}_{2}n$ (balancing $Mlog2$ with $logn$ ), resulting in

$E\left[R\left({\stackrel{^}{f}}_{n}\right)\right]-\underset{f\in \mathcal{F}}{min}R\left(f\right)=O\left(\sqrt{\frac{logn}{n}}\right).$

Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
it is a goid question and i want to know the answer as well
Maciej
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
what is fullerene does it is used to make bukky balls
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
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
so some one know about replacing silicon atom with phosphorous in semiconductors device?
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 ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
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
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!