S V M (SVM) : Upport Ector Achine
S V M (SVM) : Upport Ector Achine
(SVM)
One of the most prevailing and exciting
supervised learning models with associated
learning algorithms that analyse data and
recognise patterns is Support Vector Machines
(SVMs).
For point C, since it’s far away from the decision boundary, we are quite
certain to classify it as 1.
For point A, even though we classify it as 1 for now, since it is pretty close
to the decision boundary, if the boundary moves a little to the right, we
would mark point C as “0” instead.
You need to remember a thumb rule to identify the right hyper-plane: “Select
the hyper-plane which segregates the two classes better”. In this scenario,
hyper-plane “B” has excellently performed this job.
IDENTIFY THE RIGHT HYPER-PLANE
(SCENARIO-2):
Here, we have three hyper-planes (A, B and C)
and all are segregating the classes well. Now,
How can we identify the right hyper-plane?
Here, maximizing the distances between nearest data point (either class) and
hyper-plane will help us to decide the right hyper-plane. This distance is called
as Margin. Let’s look at the next figure:
Above, you can see that the margin for hyper-plane C is high as compared to
both A and B. Hence, we name the right hyper-plane as C. Another lightning
reason for selecting the hyper-plane with higher margin is robustness. If we
select a hyper-plane having low margin then there is high chance of
miss-classification.
IDENTIFY THE RIGHT HYPER-PLANE
(SCENARIO-3):
The hyper-plane B seems a good choice here as it has higher margin compared
to A. But, here is the catch, SVM selects the hyper-plane which classifies the
classes accurately prior to maximizing margin.
Here, hyper-plane B has a classification error and A has classified all correctly.
Therefore, the right hyper-plane is A.
CAN WE CLASSIFY TWO
CLASSES (SCENARIO-4)?:
Soft Margin
Overfitting problem:
⚫ The hyperplane is affected by only the support
vectors thus SVMs are not robust to the outliner.
LINEAR SOLVED EXAMPLE
LINEAR SOLVED EXAMPLE
LINEAR SOLVED EXAMPLE
LINEAR SOLVED EXAMPLE
LINEAR SOLVED EXAMPLE
LINEAR SOLVED EXAMPLE
LINEAR SOLVED EXAMPLE
LINEAR SOLVED EXAMPLE
LINEAR SOLVED EXAMPLE