In this session, we will discuss about support washing vector machines.
Support vector machines.
Ah, one of the most popular supervised machine learning algorithms.
And it is used for classification as well as aggression problems, but usually it is used for the classification
problems.
The goal of the support vector machine algorithm is to create the best line or decision boundary that
can segregate the dimensional space into classes.
So we will be creating several lines between these two classes so that we are able to segregate them
into different classes.
Now, these lines will be helpful, as we can easily put the new data in the correct category using
these lines of segregation and this decision boundary, this line which we have created is called hyperbole.
Now, because this is just a day data, so this is a lie, but when it becomes a multiple dimensional
data, because we will be having a lot of features which we will be dealing with.
So in that case, it will become a hyperbole because it will be not multi-dimensional space.
Now, for SVM, we choose the extreme point or vectors that help in creating the hyperbole.
Now, these extreme cases are called support vectors.
So if we choose in these two classes, so for these two classes, the two points which are nearest to
this particular class on this and this particular triangle, and the two point from this class which
are nearest to the triangle class are this and this point.
So from these points, which are nearest to the other class, these are called support victims.
So these two points will be known as support weapons for each class.
And hence, that is where this algorithm is called support vector machines, because it is using these
support vectors to actually create this line or type of plane.
So let us see what are different shapes which we have.
So the system can be in linear form also or in non-linear formula.
So now let's have a look at this particular data.
So here we have this data, which is present in a circular form, so I cannot really draw a single line
here to divide these data points into two different classes.
So what I will have to do is I will have to transform this data from two dimensional to three dimensions.
So when I have a look at this data into another dimension, which is I which I have, I did so here
I have added a dimension Z.
So when I look at this data with respect to, say, the next dimension, I can see that there is one
line of separation between both of the classes.
So I will play I will place a hybrid plane between both of these dimensions and that type of plane will
actually help us to create a line of segregation between the.
So here you can see that on transforming back to the spy plane, the leanness apparatus has become a
circle and hence it was able to segregate the classes.
Now, let us have a look at these SBM, so what SVM does is it finds the most similar examples between
the classes.
So these examples will be the support this, so when we're looking at this particular class, which
is the mango class, it tries to find out an apple, which is more like and mango.
So mangoes are usually yellow and longer in size, oval in size.
So we look for an apple, which is a little bit a little yellowish in color and a little longer than
usual, or apples.
So those become the support, therefore, the apples.
Then when they look at the apple does.
They tried to find out the which just a little shorter in height, not really oval, but circular in
shape, and they found them as these support victims.
Now, between these support vectors, we draw the line, these support vectors actually connected to
the line of segregation, and between these two lines, we create one line, which is having the maximum
margin from these two lines.
And this margin is actually called this line, which we have created is actually called the Hyper.
So here's the same thing has been explained, that, for example, in Mango's example, other Al Gore
will try to find the differences between Mango's and that is Mingo's elliptical and yellow by police
around Andric.
But SBM will actually try to find out Manguel.
That looks like an apple that is written down, an apple that actually looks like mineable, which is
yellow and elliptical, and then use these as the support windows.
Now, here you can visualize the same thing.
So we have this red glass and here we have the blue glass.
So we have found the ones which are nearest to the blue one and all of them are supposed to make those.
And here the blue ones, which are nearer to the right are the subject victims from the blue glass and
from them, we have found out the maximum margin and maximizing the margin on both the directions we
create of.
Separating hyperbole now, once we have decided upon these supposed victories, we don't really need
the other points from this data.
Now, because we don't really need these other points from the data, so we don't really need to compare
the other points while classifying world.
All we need is this hyper plane, once this hyper plane has been generated, whatever point we are looking
at, we will just compare the point with the hyperbole and the direction in which the point lies from
the hydroplaned and decide what class it belongs to.
Now, let us look at the steps so we select in case we have a data, then we select all hyper planes
with separate the data with no points between them.
That is the red line.
This these lines.
These red lines, which do not have any data in between.
So we create these two hyperlinked.
Now we maximise their distance, that is the margin between them is maximized once we have maximized
these distances, then the average line that is the line between both of those two red lines will be
the decision boundary.
The line in between the green line is called the decision boundary.
We could have had multiple lines in between like the line or line B, but because it has the maximum
distance from both line and B, hence we use the line E as the hyper.