Support Vector Machine
Support Vector Machine
Support Vector Machine
1.Hyperplane: Hyperplane is the decision boundary that is used to separate the data points of different classes in a feature
space. In the case of linear classifications, it will be a linear equation i.e. wx+b = 0.
2.Support Vectors: Support vectors are the closest data points to the hyperplane, which makes a critical role in deciding the
hyperplane and margin.
3.Margin: Margin is the distance between the support vector and hyperplane. The main objective of the support vector
machine algorithm is to maximize the margin. The wider margin indicates better classification performance.
4.Kernel: Kernel is the mathematical function, which is used in SVM to map the original input data points into high-
dimensional feature spaces, so, that the hyperplane can be easily found out even if the data points are not linearly
separable in the original input space. Some of the common kernel functions are linear, polynomial, radial basis
function(RBF), and sigmoid.
5.Hard Margin: The maximum-margin hyperplane or the hard margin hyperplane is a hyperplane that properly separates the
data points of different categories without any misclassifications.
6.Soft Margin: When the data is not perfectly separable or contains outliers, SVM permits a soft margin technique. Each data
point has a slack variable introduced by the soft-margin SVM formulation, which softens the strict margin requirement and
permits certain misclassifications or violations. It discovers a compromise between increasing the margin and reducing
violations.
7.C: Margin maximisation and misclassification fines are balanced by the regularisation parameter C in SVM. The penalty for
going over the margin or misclassifying data items is decided by it. A stricter penalty is imposed with a greater value of C,
MAXIMAL MARGIN CLASSIFIER
MAXIMAL MARGIN CLASSIFIER
SEPARATING HYPERPLANE
• We know that logistic regression
estimates linear decision boundaries
in classification problems. The basis
for support vector classifiers.
• Formally, in a linearly separable case, there exists such that the line
• If we code the response as for the two classes, then for a data point
with predictor values , we have the relation
with respect to .
MAXIMAL MARGIN CLASSIFIER
MAXIMAL MARGIN
• Once we obtain the estimators , the optimal separating hyperplane is .
• Thus, our classification rule is as follows: for a new observation ,
o If , then the i-th data point is on the correct side of the margin
o If , then the i-th data point is on the wrong side of the margin
(violated the margin)
o If , then the i-th data point is on the wrong side of the hyperplane
SUPPORT VECTOR CLASSIFIERS
SUPPORT VECTOR / SOFT-MARGIN CLASSIFIER
• The support vector classifiers then attempt to maximize the margin
such that , for a pre-specified constant
o controls the number and severity of the violations to the margin
and to the hyperplane that can be tolerated by the classier.
• We fit the support vector classifier using input features , and produce the
nonlinear function
SUPPORT VECTOR MACHINES
KERNEL TRICK
• Without going into mathematics, SVM does so using the so called kernel
trick, i.e. by specifying a kernel function that controls which nonlinear
features to include in the classifier.
where
SUPPORT VECTOR REGRESSION
MODEL
• Support vector regression solves the following problem:
July 2023