# 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.

how can chip be made from sand
is this allso about nanoscale material
Almas
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 is the latest information on a no technology how can I find it
William
currently
William
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
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!