


So as it is 2-d space so by just using a straight line, we can easily separate these two classes. We want a classifier that can classify the pair(x1, x2) of coordinates in either green or blue. Suppose we have a dataset that has two tags (green and blue), and the dataset has two features x1 and x2. The working of the SVM algorithm can be understood by using an example. Since these vectors support the hyperplane, hence called a Support vector. The data points or vectors that are the closest to the hyperplane and which affect the position of the hyperplane are termed as Support Vector. We always create a hyperplane that has a maximum margin, which means the maximum distance between the data points. And if there are 3 features, then hyperplane will be a 2-dimension plane. The dimensions of the hyperplane depend on the features present in the dataset, which means if there are 2 features (as shown in image), then hyperplane will be a straight line. This best boundary is known as the hyperplane of SVM. Hyperplane: There can be multiple lines/decision boundaries to segregate the classes in n-dimensional space, but we need to find out the best decision boundary that helps to classify the data points. Hyperplane and Support Vectors in the SVM algorithm: Non-linear SVM: Non-Linear SVM is used for non-linearly separated data, which means if a dataset cannot be classified by using a straight line, then such data is termed as non-linear data and classifier used is called as Non-linear SVM classifier.Linear SVM: Linear SVM is used for linearly separable data, which means if a dataset can be classified into two classes by using a single straight line, then such data is termed as linearly separable data, and classifier is used called as Linear SVM classifier.SVM algorithm can be used for Face detection, image classification, text categorization, etc. On the basis of the support vectors, it will classify it as a cat. So as support vector creates a decision boundary between these two data (cat and dog) and choose extreme cases (support vectors), it will see the extreme case of cat and dog. We will first train our model with lots of images of cats and dogs so that it can learn about different features of cats and dogs, and then we test it with this strange creature. Suppose we see a strange cat that also has some features of dogs, so if we want a model that can accurately identify whether it is a cat or dog, so such a model can be created by using the SVM algorithm. Consider the below diagram in which there are two different categories that are classified using a decision boundary or hyperplane:Įxample: SVM can be understood with the example that we have used in the KNN classifier. These extreme cases are called as support vectors, and hence algorithm is termed as Support Vector Machine.

SVM chooses the extreme points/vectors that help in creating the hyperplane. This best decision boundary is called a hyperplane. The goal of the SVM algorithm is to create the best line or decision boundary that can segregate n-dimensional space into classes so that we can easily put the new data point in the correct category in the future. However, primarily, it is used for Classification problems in Machine Learning. Support Vector Machine or SVM is one of the most popular Supervised Learning algorithms, which is used for Classification as well as Regression problems. Next → ← prev Support Vector Machine Algorithm
