ISLR_ch9.1 Maximal_Margin_Classifier
What Is a Hyperplane?
In a p-dimensional space, a hyperplane is a flat affine subspace of hyperplanedimension p − 1. For instance, in two dimensions, a hyperplane is a flat one-dimensional subspace—in other words, a line. In three dimensions, a hyperplane is a flat two-dimensional subspace—that is, a plane. In p > 3 dimensions, it can be hard to visualize a hyperplane, but the notion of a (p − 1)-dimensional flat subspace still applies. The mathematical definition of a hyperplane is quite simple. In two dimensions, a hyperplane is defined by the equation
The word affine indicates that the subspace need not pass through the origin.
A p dimensional hyperplane is defined as
$$ \normalsize \beta_{0} + \beta_{1}X_{1} + \beta_{2}X_{2} +\ …\ + \beta_{p}X_{p} = 0 $$
which means that any $$ X = (X_{1},\ X_{2},\ …,\ X_{p})^{T} $$ for which the above hyperplane equation holds is a point on the hyperplane.
If $ X = (X_{1},\ X_{2},\ …,\ X_{p})^{T} $ doesn’t fall on the hyperplane, then it must fall on one side of the hyperplane or the other. As such, a hyperplane can be thought of as dividing a $ p $-dimensional space into two partitions. Which side of the hyperplane a point falls on can be computed by calculating the sign of the result of plugging the point into the hyperplane equation.
Classification Using a Separating Hyperplane
The Maximal Margin Classifier
advantage: it is elegant and simple, disadvantage: it cannot be applied to most data sets, since it requires that the classes be separable by a linear boundary.