# 0.3 Introduction to complexity regularization  (Page 3/3)

 Page 3 / 3

The number of unique labellings of the training data that can be achieved with linear classifiers is, in fact, finite. A line can bedefined by picking any pair of training points, as illustrated in [link] . Two classifiers can be defined from each such line: one that outputs a label “1” for everything on or abovethe line, and another that outputs “0” for everything on or above. There exist $\left(\genfrac{}{}{0pt}{}{n}{2}\right)$ such pairs of training points, and these define all possible unique labellings of the training data.Therefore, there are at most $2\left(\genfrac{}{}{0pt}{}{n}{2}\right)$ unique linear classifiers for any random set of $n$ 2-dimensional features (the factor of 2 is due to the fact that for each linear classifier thereare 2 possible assignments of the labelling).

Thus, instead of infinitely many linear classifiers, we realize that as far as a random sample of $n$ training data is concerned, there are at most

$\begin{array}{ccc}\hfill 2\left(\genfrac{}{}{0pt}{}{n}{2}\right)& =& \frac{2n!}{\left(n-2\right)!2!}\hfill \\ & =& n\left(n-1\right)\hfill \end{array}$

unique linear classifiers. That is, using linear classification rules, there are at most $n\left(n-1\right)\approx {n}^{2}$ unique label assignments for $n$ data points. If we like, we can encode each possibility with ${log}_{2}n\left(n-1\right)\approx 2{log}_{2}n$ bits. In $d$ dimensions there are $2\left(\genfrac{}{}{0pt}{}{n}{d}\right)$ hyperplane classification rules which can be encoded in roughly $d{log}_{2}n$ bits. Roughly speaking, the number of bits required for encoding each model is the VC dimension. Theremarkable aspect of the VC dimension is that it is often finite even when $\mathcal{F}$ is infinite (as in this example).

If $\mathcal{X}$ has $d$ dimensions in total, we might consider linear classifiers based on $1,2,\cdots ,d$ features at a time. Lower dimensional hyperplanes are less complex than higher dimensionalones. Suppose we set

$\begin{array}{ccc}\hfill {\mathcal{F}}_{1}& =& \text{linear}\phantom{\rule{4.pt}{0ex}}\text{classifiers}\phantom{\rule{4.pt}{0ex}}\text{using}\phantom{\rule{4.pt}{0ex}}\text{1}\phantom{\rule{4.pt}{0ex}}\text{feature}\hfill \\ \hfill {\mathcal{F}}_{2}& =& \text{linear}\phantom{\rule{4.pt}{0ex}}\text{classifiers}\phantom{\rule{4.pt}{0ex}}\text{using}\phantom{\rule{4.pt}{0ex}}\text{2}\phantom{\rule{4.pt}{0ex}}\text{features}\hfill \\ \hfill \cdots & & \text{and}\phantom{\rule{4.pt}{0ex}}\text{so}\phantom{\rule{4.pt}{0ex}}\text{on}\phantom{\rule{4.pt}{0ex}}\hfill \end{array}.$

These spaces have increasing VC dimensions, and we can try to balance the empirical risk and a cost function depending on the VC dimension.Such procedures are often referred to as Structural Risk Minimization . This gives you a glimpse of what the VC dimension is all about. In future lectures we will revisit this topic in greaterdetail.

## Hold-out methods

The basic idea of “hold-out” methods is to split the $n$ samples $D\equiv {\left\{{X}_{i},{Y}_{i}\right\}}_{i=1}^{n}$ into a training set, ${D}_{T}$ , and a test set, ${D}_{V}$ .

$\begin{array}{ccc}\hfill {D}_{T}={\left\{{X}_{i},{Y}_{i}\right\}}_{i=1}^{m},& & {D}_{V}={\left\{{X}_{i},{Y}_{i}\right\}}_{i=m+1}^{n}\hfill \end{array}.$

Now, suppose we have a collection of different model spaces $\left\{{\mathcal{F}}_{\lambda }\right\}$ indexed by $\lambda \in \Lambda$ (e.g., ${\mathcal{F}}_{\lambda }$ is the set of polynomials of degree $d$ , with $\lambda =d$ ), or suppose that we have a collection of complexity penalization criteria ${L}_{\lambda }\left(f\right)$ indexed by $\lambda$ ( e.g., let ${L}_{\lambda }\left(f\right)=\stackrel{^}{R}\left(f\right)+\lambda c\left(f\right)$ , with $\lambda \in {\mathbf{R}}^{+}$ ). We can obtain candidate solutions using the training set as follows. Define

$\begin{array}{ccc}\hfill {\stackrel{^}{R}}_{m}\left(f\right)& =& \sum _{i=1}^{m}\ell \left(f\left({X}_{i}\right),{Y}_{i}\right)\hfill \end{array}$

and take

$\begin{array}{ccc}\hfill {\stackrel{^}{f}}_{\lambda }& =& arg\underset{f\in {\mathcal{F}}_{\lambda }}{min}{\stackrel{^}{R}}_{m}\left(f\right)\hfill \end{array}$

or

$\begin{array}{ccc}\hfill {\stackrel{^}{f}}_{\lambda }& =& arg\underset{f\in \mathcal{F}}{min}\phantom{\rule{0.166667em}{0ex}}\left\{{\stackrel{^}{R}}_{m},\left(f\right),+,\lambda ,c,\left(f\right)\right\}\hfill \end{array}.$

This provides us with a set of candidate solutions $\left\{{\stackrel{^}{f}}_{\lambda }\right\}$ . Then we can define the hold-out error estimate using the test set:

$\begin{array}{ccc}\hfill {\stackrel{^}{R}}_{V}\left(f\right)& =& \frac{1}{n-m+1}\sum _{i=m+1}^{n}\ell \left(f\left({X}_{i}\right),{Y}_{i}\right),\hfill \end{array}$

and select the “best” model to be $\stackrel{^}{f}={\stackrel{^}{f}}_{\stackrel{^}{\lambda }}$ where

$\begin{array}{ccc}\hfill \stackrel{^}{\lambda }& =& arg\underset{\lambda }{min}{\stackrel{^}{R}}_{V}\left({\stackrel{^}{f}}_{\lambda }\right)\hfill \end{array}.$

This type of procedure has many nice theoretical guarantees, provided both the training and test set grow with $n$ .

## Leaving-one-out cross-validation

A very popular hold-out method is the so call “leaving-one-out cross-validation” studied in depth by Grace Wahba (UW-Madison,Statistics). For each $\lambda$ we compute

$\begin{array}{ccc}\hfill {\stackrel{^}{f}}_{\lambda }^{\left(k\right)}& =& arg\underset{f\in \mathcal{F}}{min}\frac{1}{n}\sum _{\stackrel{i=1}{i\ne k}}^{n}\ell \left(f\left({X}_{i}\right),{Y}_{i}\right)+\lambda C\left(f\right)\hfill \end{array}$

or

$\begin{array}{ccc}\hfill {\stackrel{^}{f}}_{\lambda }^{\left(k\right)}& =& arg\underset{f\in {\mathcal{F}}_{\lambda }}{min}\frac{1}{n}\sum _{\stackrel{i=1}{i\ne k}}^{n}\ell \left(f\left({X}_{i}\right),{Y}_{i}\right).\hfill \end{array}$

Then we have cross-validation function

$\begin{array}{ccc}\hfill V\left(\lambda \right)& =& \frac{1}{n}\sum _{k=1}^{n}\ell \left({f}_{\lambda }^{\left(k\right)}\left({X}_{k}\right),{Y}_{k}\right)\hfill \\ \hfill {\lambda }^{*}& =& arg\underset{\lambda }{min}V\left(\lambda \right).\hfill \end{array}$

## Summary

To summarize, this lecture gave a brief and incomplete survey of different methods for dealing with the issues of overfitting and modelselection. Given a set of training data, ${D}_{n}={\left\{{X}_{i},{Y}_{i}\right\}}_{i=1}^{n}$ , our overall goal is to find

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

from some collection of functions, $\mathcal{F}$ . Because we do not know the true distribution ${P}_{XY}$ underlyingthe data points ${D}_{n}$ , it is difficult to get an exact handle on the risk, $R\left(f\right)$ . If we only focus on minimizing the empirical risk $\stackrel{^}{R}\left(f\right)$ we end up overfitting to the training data. Two general approaches were presented.

1. In the first approach we consider an indexed collection of spaces ${\left\{{\mathcal{F}}_{\lambda }\right\}}_{\lambda \in \Lambda }$ such that the complexity of ${\mathcal{F}}_{\lambda }$ increases as $\lambda$ increases, and
$\underset{\lambda \to \infty }{lim}{\mathcal{F}}_{\lambda }=\mathcal{F}.$
A solution is given by
$\begin{array}{c}\hfill {\stackrel{^}{f}}_{{\lambda }^{*}}=arg\underset{f\in {\mathcal{F}}_{{\lambda }^{*}}}{min}{\stackrel{^}{R}}_{n}\left(f\right)\end{array}$
where either ${\lambda }^{*}$ is a function which increases with $n$ ,
$\begin{array}{ccc}\hfill {\lambda }^{*}& =& \lambda \left(n\right),\hfill \end{array}$
or ${\lambda }^{*}$ is chosen by hold-out validation.
2. The alternative approach is to incorporate a penalty term into the risk minimization problem formulation. Here we consideran indexed collection of penalties ${\left\{{C}_{\lambda }\right\}}_{\lambda \in \Lambda }$ satisfying the following properties:
1. ${C}_{\lambda }:\mathcal{F}\to {\mathbf{R}}^{+}$ ;
2. For each $f\in \mathcal{F}$ and ${\lambda }_{1}<{\lambda }_{2}$ we have ${C}_{{\lambda }_{1}}\left(f\right)\le {C}_{{\lambda }_{2}}\left(f\right)$ ;
3. There exists ${\lambda }_{0}\in \Lambda$ such that ${C}_{{\lambda }_{0}}\left(f\right)=0$ for all $f\in \mathcal{F}$ .
In this formulation we find a solution
$\begin{array}{ccc}\hfill {\stackrel{^}{f}}_{{\lambda }^{*}}& =& arg\underset{f\in \mathcal{F}}{min}{\stackrel{^}{R}}_{n}\left(f\right)+{C}_{{\lambda }^{*}}\left(f\right),\hfill \end{array}$
where either ${\lambda }^{*}=\lambda \left(n\right)$ , a function growing the number of data samples $n$ , or ${\lambda }^{*}$ is selected by hold-out validation.

## Consistency

If an estimator or classifier ${\stackrel{^}{f}}_{{\lambda }^{*}}$ satisfies

$E\left[R,\left(,{\stackrel{^}{f}}_{{\lambda }^{*}},\right)\right]\to \underset{f\in \mathcal{F}}{inf}R\left(f\right)\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\phantom{\rule{4pt}{0ex}}\text{as}\phantom{\rule{4.pt}{0ex}}n\to \infty ,$

then we say that ${\stackrel{^}{f}}_{{\lambda }^{*}}$ is $\mathcal{F}$ -consistent with respect to the risk $R$ . When the context is clear, we will simply say that $\stackrel{^}{f}$ is consistent.

so some one know about replacing silicon atom with phosphorous in semiconductors device?
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
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!