# 2.2 Machine learning lecture 3 course notes  (Page 11/12)

 Page 11 / 12

Also, the KKT dual-complementarity conditions (which in the next section will be useful for testing for the convergence of the SMO algorithm) are:

$\begin{array}{ccc}\hfill {\alpha }_{i}=0& ⇒& {y}^{\left(i\right)}\left({w}^{T}{x}^{\left(i\right)}+b\right)\ge 1\hfill \\ \hfill {\alpha }_{i}=C& ⇒& {y}^{\left(i\right)}\left({w}^{T}{x}^{\left(i\right)}+b\right)\le 1\hfill \\ \hfill 0<{\alpha }_{i}

Now, all that remains is to give an algorithm for actually solving the dual problem, which we will do in the next section.

## The smo algorithm

The SMO (sequential minimal optimization) algorithm, due to John Platt, gives an efficient way of solving the dual problem arising from the derivation of the SVM. Partly to motivatethe SMO algorithm, and partly because it's interesting in its own right, let's first take another digression to talk about the coordinate ascent algorithm.

## Coordinate ascent

Consider trying to solve the unconstrained optimization problem

$\underset{\alpha }{max}W\left({\alpha }_{1},{\alpha }_{2},...,{\alpha }_{m}\right).$

Here, we think of $W$ as just some function of the parameters ${\alpha }_{i}$ 's, and for now ignore any relationship between this problem and SVMs.We've already seen two optimization algorithms, gradient ascent and Newton's method. The new algorithm we're going to consider here is called coordinate ascent :

1. Loop until convergence: $\left\{$
1. For $i=1,...,m$ , $\left\{$
1. ${\alpha }_{i}:=arg{max}_{{\stackrel{^}{\alpha }}_{i}}W\left({\alpha }_{1},...,{\alpha }_{i-1},{\stackrel{^}{\alpha }}_{i},{\alpha }_{i+1},...,{\alpha }_{m}\right)$ .
2. $\right\}$
2. $\right\}$

Thus, in the innermost loop of this algorithm, we will hold all the variables except for some ${\alpha }_{i}$ fixed, and reoptimize $W$ with respect to just the parameter ${\alpha }_{i}$ . In the version of this method presented here, the inner-loop reoptimizes thevariables in order ${\alpha }_{1},{\alpha }_{2},...,{\alpha }_{m},{\alpha }_{1},{\alpha }_{2},...$ . (A more sophisticated version might choose other orderings; for instance, we maychoose the next variable to update according to which one we expect to allow us to make the largestincrease in $W\left(\alpha \right)$ .)

When the function $W$ happens to be of such a form that the “ $argmax$ ” in the inner loop can be performed efficiently, then coordinate ascent can be a fairlyefficient algorithm. Here's a picture of coordinate ascent in action:

The ellipses in the figure are the contours of a quadratic function that we want to optimize. Coordinateascent was initialized at $\left(2,-2\right)$ , and also plotted in the figure is the path that it took on its way to the global maximum. Notice that on each step, coordinate ascent takes astep that's parallel to one of the axes, since only one variable is being optimized at a time.

## Smo

We close off the discussion of SVMs by sketching the derivation of the SMO algorithm. Some details will be left to the homework, and for others you may refer to the paperexcerpt handed out in class.

Here's the (dual) optimization problem that we want to solve:

$\begin{array}{ccc}& {\text{max}}_{\alpha }& W\left(\alpha \right)=\sum _{i=1}^{m}{\alpha }_{i}-\frac{1}{2}\sum _{i,j=1}^{m}{y}^{\left(i\right)}{y}^{\left(j\right)}{\alpha }_{i}{\alpha }_{j}⟨{x}^{\left(i\right)},{x}^{\left(j\right)}⟩.\hfill \\ & \phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\text{s.t.}& 0\le {\alpha }_{i}\le C,\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}i=1,...,m\hfill \\ & & \sum _{i=1}^{m}{\alpha }_{i}{y}^{\left(i\right)}=0.\hfill \end{array}$

Let's say we have set of ${\alpha }_{i}$ 's that satisfy the constraints the second two equations in [link] . Now, suppose we want to hold ${\alpha }_{2},...,{\alpha }_{m}$ fixed, and take a coordinate ascent step and reoptimize the objective with respect to ${\alpha }_{1}$ . Can we make any progress? The answer is no, because the constraint (last equation in [link] ) ensures that

${\alpha }_{1}{y}^{\left(1\right)}=-\sum _{i=2}^{m}{\alpha }_{i}{y}^{\left(i\right)}.$

Or, by multiplying both sides by ${y}^{\left(1\right)}$ , we equivalently have

${\alpha }_{1}=-{y}^{\left(1\right)}\sum _{i=2}^{m}{\alpha }_{i}{y}^{\left(i\right)}.$

(This step used the fact that ${y}^{\left(1\right)}\in \left\{-1,1\right\}$ , and hence ${\left({y}^{\left(1\right)}\right)}^{2}=1$ .) Hence, ${\alpha }_{1}$ is exactly determined by the other ${\alpha }_{i}$ 's, and if we were to hold ${\alpha }_{2},...,{\alpha }_{m}$ fixed, then we can't make any change to ${\alpha }_{1}$ without violating the constraint (last equation in [link] ) in the optimization problem.

#### Questions & Answers

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
characteristics of micro business
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
Got questions? Join the online conversation and get instant answers!      By By By  By