# 0.11 Decision trees

 Page 1 / 5

## Minimum complexity penalized function

Recall the basic results of the last lectures: let $\mathcal{X}$ and $\mathcal{Y}$ denote the input and output spaces respectively. Let $X\in \mathcal{X}$ and $Y\in \mathcal{X}$ be random variables with unknown joint probability distribution ${P}_{XY}$ . We would like to use $X$ to “predict” $Y$ . Consider a loss function $0\le \ell \left({y}_{1},{y}_{2}\right)\le 1,\phantom{\rule{4pt}{0ex}}\forall {y}_{1},{y}_{2}\in \mathcal{Y}$ . This function is used to measure the accuracy of our prediction. Let $\mathcal{F}$ be a collection of candidate functions (models), $f:\mathcal{X}\to \mathcal{Y}$ . The expected risk we incur is given by $R\left(f\right)\equiv {E}_{XY}\left[\ell \left(f\left(X\right),Y\right)\right]$ . We have access only to a number of i.i.d. samples, ${\left\{{X}_{i},{Y}_{i}\right\}}_{i=1}^{n}$ . These allow us to compute the empirical risk ${\stackrel{^}{R}}_{n}\left(f\right)\equiv \frac{1}{n}{\sum }_{i=1}^{n}\ell \left(f\left({X}_{i}\right),{Y}_{i}\right)$ .

Assume in the following that $\mathcal{F}$ is countable. Assign a positive number $c\left(f\right)$ to each $f\in \mathcal{F}$ such that ${\sum }_{f\in \mathcal{F}}{2}^{-c\left(f\right)}\le 1$ . If we use a prefix code to describe each element of $\mathcal{F}$ and define $c\left(f\right)$ to be the codeword length (in bits) for each $f\in \mathcal{F}$ , the last inequality is automatically satisfied.

We define the minimum complexity penalized estimator as

${\stackrel{^}{f}}_{n}\equiv arg\underset{f\in \mathcal{F}}{min}\left\{{\stackrel{^}{R}}_{n},\left(f\right),+,\sqrt{\frac{c\left(f\right)log2+\frac{1}{2}logn}{2n}}\right\}.$

As we showed previously we have the bound

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

The performance (risk) of ${\stackrel{^}{f}}_{n}$ is on average better than

$R\left({f}_{n}^{*}\right)+\sqrt{\frac{c\left({f}_{n}^{*}\right)log2+\frac{1}{2}logn}{2n}}+\frac{1}{\sqrt{n}},$

where

${f}_{n}^{*}=arg\underset{f\in \mathcal{F}}{min}\left\{R,\left(f\right),+,\sqrt{\frac{c\left(f\right)log2+\frac{1}{2}logn}{2n}}\right\}.$

If it happens that the optimal function, that is

${f}^{*}=arg\underset{f\phantom{\rule{4.pt}{0ex}}\text{measurable}}{min}R\left(f\right),$

is close to an $f\in \mathcal{F}$ with a small $c\left(f\right)$ , then ${\stackrel{^}{f}}_{n}$ will perform almost as well as the optimal function.

Suppose ${f}^{*}\in \mathcal{F}$ , then

$E\left[R\left({\stackrel{^}{f}}_{n}\right)\right]\le R\left({f}^{*}\right)+\sqrt{\frac{c\left({f}^{*}\right)log2+\frac{1}{2}logn}{2n}}+\frac{1}{\sqrt{n}}.$

Furthermore if $c\left({f}^{*}\right)=O\left(logn\right)$ then

$E\left[R\left({\stackrel{^}{f}}_{n}\right)\right]\le R\left({f}^{*}\right)+O\left(\sqrt{\frac{logn}{n}}\right),$

that is, only within a small $O\left(\sqrt{\frac{logn}{n}}\right)$ offset of the optimal risk.

In general, we can also bound the excess risk $E\left[R\left({\stackrel{^}{f}}_{n}\right)\right]-{R}^{*}$ , where ${R}^{*}$ is the Bayes risk,

${R}^{*}=\underset{f\phantom{\rule{4.pt}{0ex}}\text{measurable}}{inf}R\left(f\right).$

By subtracting ${R}^{*}$ (a constant) from both sides of the inequality

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

we obtain

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

Note that two terms in this upper bound: $R\left(f\right)-{R}^{*}$ is a bound on the approximation error of a model $f$ , and remainder is a bound on the estimation error associated with $f$ . Thus, we see that complexity regularization automatically optimizes a balance between approximation and estimationerrors. In other words, complexity regularization is adaptive to the unknown tradeoff between approximation and estimation.

## Classification

Consider the particularization of the above to a classification scenario. Let $\mathcal{X}={\left[0,1\right]}^{d}$ , $\mathcal{Y}=\left\{0,1\right\}$ and $\ell \left(\stackrel{^}{y},y\right)\equiv {\mathbf{1}}_{\left\{\stackrel{^}{y}\ne y\right\}}$ . Then $R\left(f\right)={E}_{XY}\left[{\mathbf{1}}_{\left\{f\left(X\right)\ne Y\right\}}\right]=P\left(f\left(X\right)\ne Y\right)$ . The Bayes risk is given by

${R}^{*}=\underset{f\phantom{\rule{4.pt}{0ex}}\text{measurable}}{inf}R\left(f\right).$

As it was observed before, the Bayes classifier ( i.e., a classifier that achieves the Bayes risk) is given by

${f}^{*}\left(x\right)=\left\{\begin{array}{cc}1,\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\hfill & P\left(Y=1|X=x\right)\ge \frac{1}{2}\hfill \\ 0,\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\hfill & P\left(Y=1|X=x\right)<\frac{1}{2}\hfill \end{array}\right).$

This classifier can be expressed in a different way. Consider the set ${G}^{*}=\left\{x:\phantom{\rule{4pt}{0ex}}P\left(Y=1|X=x\right)\ge 1/2\right\}$ . The Bayes classifier can written as ${f}^{*}\left(x\right)={\mathbf{1}}_{\left\{x\in {G}^{*}\right\}}$ . Therefore the classifier is characterized entirely by the set ${G}^{*}$ , if $X\in {G}^{*}$ then the “best” guess is that $Y$ is one, and vice-versa. The boundary of this set corresponds to the points where the decision is harder.The boundary of ${G}^{*}$ is called the Bayes Decision Boundary . In [link] (a) this concept is illustrated. If $\eta \left(x\right)=P\left(Y=1|X=x\right)$ is a continuous function then the Bayes decision boundary is simply given by $\left\{x:\phantom{\rule{4pt}{0ex}}P\left(Y=1|X=x\right)=1/2\right\}$ . Clearly the structure of the decision boundary provides importantinformation on the difficulty of the problem.

are nano particles real
yeah
Joseph
Hello, if I study Physics teacher in bachelor, can I study Nanotechnology in master?
no can't
Lohitha
where we get a research paper on Nano chemistry....?
nanopartical of organic/inorganic / physical chemistry , pdf / thesis / review
Ali
what are the products of Nano chemistry?
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
hey
Giriraj
Preparation and Applications of Nanomaterial for Drug Delivery
revolt
da
Application of nanotechnology in medicine
has a lot of application modern world
Kamaluddeen
yes
narayan
what is variations in raman spectra for nanomaterials
ya I also want to know the raman spectra
Bhagvanji
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
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!