First we need to understand what qualifies for a separating hyperplane. In the following example, hyperplane C is the only correct one as it successfully segregates observations by their labels, while hyperplane A and B fail. We can express this mathematically:
In a two-dimensional space, a line can be defined by a slope vector w (represented as a two-dimensional vector) and an intercept b. Similarly, in a space of n dimensions, a hyperplane can be defined by an n-dimensional vector w and an intercept b. Any data point x on the hyperplane satisfies . A hyperplane is a separating hyperplane if:
-
For any data point x from one class, it satisfies
-
For any data point x from another class, it satisfies
There can be countless possible solutions for w and b. So, next we will learn how to identify the best hyperplane among possible separating hyperplanes.