
We saw previously, that the equation of a hyperplane can be written What do we know about hyperplanes that could help us ? Taking another look at the hyperplane equation We now want to find two hyperplanes with no points between them, but we don't have a way to visualize them. So let's assume that our dataset IS linearly separable. You can only do that if your data is linearly separable Figure 3: Data on the left can be separated by an hyperplane, while data on the right can't Moreover, even if your data is only 2-dimensional it might not be possible to find a separating hyperplane ! But with some -dimensional data it becomes more difficult because you can't draw it. Step 2: You need to select two hyperplanes separating the data with no points between themįinding two hyperplanes separating some data is easy when you have a pencil and a paper. The more formal definition of an initial dataset in set theory is : So your dataset is the set of couples of element We can say that is a -dimensional vector if it has dimensions. Moreover, most of the time, for instance when you do text classification, your vector ends up having a lot of dimensions. Note that can only have two possible values -1 or +1. Įach will also be associated with a value indicating if the element belongs to the class (+1) or not (-1). Most of the time your data will be composed of vectors. So we will now go through this recipe step by step: Step 1: You have a dataset and you want to classify it It is because as always the simplicity requires some abstraction and mathematical terminology to be well understood. If it is so simple why does everybody have so much pain understanding SVM ? The region bounded by the two hyperplanes will be the biggest possible margin.

However, even if it did quite a good job at separating the data it was not the optimal hyperplane.įigure 1: The margin we calculated in Part 2 is shown as M1Īs we saw in Part 1, the optimal hyperplane is the one which maximizes the margin of the training data.

We then computed the margin which was equal to. How do we calculate the distance between two hyperplanes ?Īt the end of Part 2 we computed the distance between a point and a hyperplane.How can we find the optimal hyperplane ?.

Here is a quick summary of what we will see: The main focus of this article is to show you the reasoning allowing us to select the optimal hyperplane. If you did not read the previous articles, you might want to start the serie at the beginning by reading this article: an overview of Support Vector Machine.
#Hyperplan separateur labels series
This is the Part 3 of my series of tutorials about the math behind Support Vector Machine.
