Support Vector Machines Made Easy

Amima Shifa
3 min readOct 30, 2022

What is a Support Vector Machine (SVM)?

A technical definition would be — “ It is an algorithm that uses non-linear mapping to transform the original training data into higher dimension. Within this new dimension , it searches for linear optimal separating hyperplane.”

Let me help you understand this easily with help of some examples!

Look at the image below, you have been given a task to separate the blue-colored shapes from the yellow-colored ones by drawing a line.

Observe the image

On observing you may notice there are many ways in which you can draw a line of separation for given entities.

There are infinite possibilities to draw the required line

Now how will you determine which line is best at separating these two entities?

Let’s think about it, you would want a line that gives enough space to both entities, such that it is not too close nor too far from any entity or else that could result in an unbalanced separation.

This line splits the data in the best possible way

Why is that the best split?

It is the best split as the distance between the blue-colored entity or vector and the yellow-colored entity or vector is maximum, this distance is called the margin and the entities or the vectors on the margin are called as support vectors.

The middlemost line is called the hyperplane, it best splits the data such that there is the maximum distance between support vectors, in other words, we are maximising the margin.

This is nothing but what a Support Vector Machine does, it separates the data in the best possible way.

Now you may be thinking, this was way too easy what about more complex data?

Well, for more complex data, it transforms the data usually using kernel functions in a way such that it is possible to find the best separating hyperplane.

Advantages of SVMs:

  • They are highly accurate and less prone to overfitting.
  • They can be used for prediction and classification.
  • They have more generalization accuracy.

Disadvantages of SVMs:

  • They are slow in training.
  • Solutions are infeasible for very large datasets.
  • Determining the best kernel for a given dataset.
  • Finding more efficient methods for multiclass cases is difficult.

--

--