0
$\begingroup$

Consider the snippet below from Andrew Ng's lecture notes on Support Vector Machines.

enter image description here

He goes on to state that $B = x^{(i)} - \gamma^{(i)} \frac{w}{\|w\|}$. I am having a hard time seeing why this is the case (calculus very very rusty). Can anyone describe the steps to arrive at this value?

$\endgroup$

1 Answer 1

1
$\begingroup$

Their $\gamma^{i}$ is the distance from the point $A$ to the plane. The closest point $B$ on the plane to $A$ is the orthogonal projection of $A$ onto the plane; orthogonal projection onto a plane and closest point projection are always the same, regardless of dimension. That is, $A-B$ must be in the direction of the normal $w$ to the plane. In this case, apparently the vector from $B$ to $A$ is in the same direction as $w$. Therefore, if the distance from $A$ to the plane is $\gamma^{i}$, then $$ A=B+\gamma^{i}\frac{1}{\|w\|}w $$ or $$ A-\gamma^{i}\frac{1}{\|w\|}w=B. $$

$\endgroup$
3
  • $\begingroup$ Can I say this back and see if I understand? $\vec{AB}$ is equal to $\vec{A} - \vec{B}$. Since we know that $\vec{AB}$ is in the direction of $\frac{w}{||w||}$ and has magnitude $\gamma$ then we know that we can scale $\frac{w}{||w||}$ by $\gamma$ as a representation of $\vec{AB}$. Thus, we can write $\vec{AB}$= $\gamma$ $\frac{w}{||w||}$ or $\vec{A} - \vec{B}$ = $\gamma$ $\frac{w}{||w||}$ or $\vec{B}$ =$\vec{A} - \gamma$ $\frac{w}{||w||}$ $\endgroup$
    – B_Miner
    Nov 14, 2014 at 0:38
  • 1
    $\begingroup$ @B_Miner : That's it! $\endgroup$ Nov 14, 2014 at 1:00
  • 1
    $\begingroup$ Yeah! Thanks! Appreciate it TAE $\endgroup$
    – B_Miner
    Nov 14, 2014 at 1:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .