A support vector machine (SVM) is a popular machine learning algorithm for supervised learning. It can be used for both classification and regression problems. In classification learning, SVM performs classifications by finding an optimal separating hyperplane that differentiates two classes of observations. If the data is linearly separable and one-dimensional, we may have a point that separates the data. In two-dimensional space, the data can be separated by a straight line, while a plane separates data in three-dimensional space. When we have more than three dimensions, this is called a hyperplane.
For a linear SVM, a dataset X with n feature vectors is represented as follows:
A bipolar target variable Y is written as follows:
The hyperplane is given by the following:
For an SVM, the two classes are represented as -1 and +1 instead of 1 and 0. The...