I'm trying to learn maths behind SVM (hard margin) but due to different forms of mathematical formulations I'm bit confused.
Assume we have two sets of points $\text{(i.e. positives, negatives)}$ one on each side of hyperplane $\pi$.
So the equation of the margin maximizing plane $\pi$ can be written as, $$\pi:\;W^TX+b = 0$$
- If $y\in$ $(1,-1)$ then,
$$\pi^+:\; W^TX + b=+1$$ $$\pi^-:\; W^TX + b=-1$$
- Here $\pi^+$ and $\pi^-$ are parallel to plane $\pi$ and they are also parallel to each other. Now the objective would be to find a hyperplane $\pi$ which maximizes the distance between $\pi^+$ and $\pi^-$.
Here $\pi^+$ and $\pi^-$ are the hyperplanes passing through positive and negative support vectors respectively
According to wikipedia about
SVM
I've found that distance/margin between $\pi^+$ and $\pi^-$ can be written as, $$\hookrightarrow\frac{2}{||w||}$$Now if I put together everything this is the constraint optimization problem we want to solve, $$\text{find}\;w_*,b_* = \underbrace{argmax}_{w,b}\frac{2}{||w||} \rightarrow\text{margin}$$ $$\hookrightarrow \text{s.t}\;\;y_i(w^Tx\;+\;b)\;\ge 1\;\;\;\forall\;x_i$$
Before proceeding to my doubts please do confirm if my understanding above is correct? If you find any mistakes please do correct me.
- How to derive margin between $\pi^+$ and $\pi^-$ to be $\frac{2}{||w||}?$ I did find a similar question asked
here
but I couldn't understand the formulations used there? If possible can anyone explain it in the formulation I used above? - How can $y_i(w^Tx+b)\ge1\;\;\forall\;x_i$?