Processing math: 100%

 

 

 

Setting up the problem

In order to solve the above problem, we define the following Lagrangian function to be minimized L(λ,b,w)=12wTwni=1λi[yi(wTxi+b)1], where λi is a so-called Lagrange multiplier subject to the condition λi0.

Taking the derivatives with respect to b and w we obtain Lb=iλiyi=0, and Lw=0=wiλiyixi. Inserting these constraints into the equation for L we obtain L=iλi12nijλiλjyiyjxTixj, subject to the constraints λi0 and iλiyi=0. We must in addition satisfy the Karush-Kuhn-Tucker (KKT) condition λi[yi(wTxi+b)1]i.

  1. If λi>0, then yi(wTxi+b)=1 and we say that xi is on the boundary.
  2. If yi(wTxi+b)>1, we say xi is not on the boundary and we set λi=0.
When λi>0, the vectors xi are called support vectors. They are the vectors closest to the line (or hyperplane) and define the margin M.