Introduction
Support vector machines are a method of binary classification. The basic idea is to find a linear separating line (or hyperplane) between the two classes. We first assume that the binary class targets are -1
or 1
, instead of the prior 0
or 1
targets. Since there may be many lines that separate two classes, we define the best linear separator that maximizes the distance between both classes.
![Introduction](https://static.packt-cdn.com/products/9781786462169/graphics/graphics/B05480_04_01.jpg)
Figure 1: Given two separable classes, 'o' and 'x', we wish to find the equation for the linear separator between the two. The left shows that there are many lines that separate the two classes. The right shows the unique maximum margin line. The margin width is given by 2/. This line is found by minimizing the L2 norm of A.
We can write such a hyperplane as follows:
![Introduction](https://static.packt-cdn.com/products/9781786462169/graphics/graphics/B05480_04_11.jpg)
Here, A is a vector of our partial slopes and x is a vector of inputs. The width of the maximum margin can be shown to be two divided by the L2 norm of A. There are many proofs out there of this fact, but for...