Support vector machines work well in high dimensional space with clear margin or separation thus thinking like vectors.

Support Vector Machine(SVM) is a supervised non-linear machine learning algorithm which can be used for both classification and regression problems. SVM is used to generate multiple separating hyperplanes such that it divides segments of data space and each segment contains only one kind of data.

SVM technique is useful for data whose distribution is unknown i.e which has Non-regularity i.e data in spam classification, handwriting recognition, text categorization, speaker identification etc. I listed applications of support vector machine with it.:)

This post is about explaining support vector machines with an example, demonstration of support vector machine on a dataset and explanation of generated outputs of demonstration.

What lies behind SVM with example?

Picture exclusively created

In Support Vector Machines, we plot each data as a point in n-dimensional space(where “n” is the number of features) with the value of each feature being a value of a particular coordinate. Then, we perform classification by finding hyperplane that differentiates the classes.

Example

Consider a dataset containing Apples and Oranges. So, to classify them, we use Support Vector machine ad labelled training data on plane.

<

A support vector machine(SVM) takes these data points and outputs the hyperplane (which is a two-dimension line of equation y = ax + b) that best separates the tags. The line is called the **decision boundary **i.e anything that falls to one side of it is classified as Apple and anything that falls to the other as Orange.

The hyperplane(Two-dimensional line) is best when it’s the distance to the nearest element of each data point or tag is the largest i.e specified on maximum margins.

All points on the line ax+b=0 will satisfy the equation so, we draw two parallel lines ax+b=-1 for one side and ax+b=1 for the other side such that these lines pass through a datapoint or tag in the segment which is nearest to our line, then the distance between these two lines will be our margin.

#algorithms #data-science #r #support-vector-machine #machine-learning #algorithms

Support Vector Machines — Thinking like vectors!
1.35 GEEK