Support vector machines
This model is trained with the labeled data and the
algorithm outputs the optimal hyperplane which will be seen as a line in 2d
space.
This hyperplane is used to separate two classes called binary classification. To perform SVM on multi-class problems, we can create a binary classifier for each class of the data.
The two results of each classifier will be:
● The data points belong to that class or
● The data points might not belong to the class.
Let’s understand it better with an example,
In a class of flowers, we create binary classes for each flower to perform multi-class classification. To say, rose is a class and binary class is to predict if the new data is rose or not. The classifier with the highest score is chosen as the output of the SVM.
SVM for complex data
SVM works very well without any modifications for linearly separable data. Linearly separable data is any data that can be plotted in a graph and can be separated into classes using a straight line.
Linearly separable data Non linearly separable data
But for non-linearly separable data classes cannot be separated using the straight line. For Non linearly separable data we use Kernelized SVM. If we have some non-linearly separable data in one dimension. We can transform this data into two-dimensions and the data will become linearly separable in two dimensions. We can just map the data to a higher dimension and then make it linearly separable.
The Kernel is a measure of similarity between the data points. There are various kinds of kernel functions.
But 2 functions are very popular, they are:
● Radial basis function kernel: The similarity between two points in the transformed feature space is an exponentially decaying function of the distance between the vectors and the original input space as shown below. RBF is the default kernel used in SVM.

● Polynomial kernel: The Polynomial kernel takes an additional parameter, ‘degree’ that controls the model’s complexity and computational cost of the transformation.
Pros and Cons of SVM Classifiers
Pros:
SVM classifiers offer great accuracy and work well with high dimensional space. SVM classifiers basically use a subset of training points hence in result uses very less memory.
Cons:
They have high training time hence in practice not suitable for large datasets. Another disadvantage is that SVM classifiers do not work well with overlapping classes.
So, to conclude Support Vector Machine is a supervised ml algorithm that is used to analyze the data for classification and regression analysis. It is the most widely used algorithm for classifying linearly separable data.
Comments
Post a Comment