In this video, we are going to talk about support vector machines.
We are an extension of support to classify it.
As I told you in last video, support vector machines used Col's to be able to create non-linear boundaries.
And what is a common.
Gunnell is simply some functional relationship between two observations.
And as we change this function, we will get different shapes of decision boundaries.
Basically, we try to take the impact of each observation at a particular point, and this impact is
given by a function.
If you take the function to be this.
That is in a product of two points.
You will end up with a straight line by doing some mathematics.
It can be shown that this linear kernel is effectively support better classifier only bartends.
Mathematics will get complicated.
Plus, you do not need it to solve any business problem.
Therefore, we will not be covering the mathematics bar behind it.
Next, if you want a polynomial type of boundry, the cardinal function looks like this.
It is one plus in a product.
Could the power be value of B, will the domain, the flexibility of this polynomial boundary?
B is also known as degree of this polynomial, for our example?
Well, we were not able to create a good linear separator.
You can see that by using a polynomial boundary of sufficiently high degree.
We can classify the observations much better.
Lastly, this radial cardinal is one of the most frequently used cardinal functions.
It is given by this complicated looking formula and this formula.
The first part is a great deal, distance between two points.
And this radial distance is multiplied with a positive, constant gamma.
Now, the distances large or the value of dormice is large.
This product will be large.
And due to this negative sign, the exponential value will be very small.
So even if the distance off point is not much and got my large.
Nearby point will not have much effect.
Only very close point will impact at any given point.
Therefore, large value of gamma will give us very tight margins.
In short, Gama'a defines how much influence a single training example is going to have at any particular
point.
So larger rally of Gamel mean only closer point have an impact.
And farther away point do not have any impact on that at that particular point.
Does garment will also be a hyper barometer, which we need to tune using cross-validation?
And we will try to find out a value of glamour at which edit it will be minimum this link that I showed
you earlier.
Also.
This we can use to visualize the did a deal compelled also.
So let us take it out.
So by default, this has Radil Cardinals elected.
If you scroll down.
You can see the two hyper barometers that you can tune.
One is sea and one is the cardinal think much of it is the same as the Gama that we discussed into religion.
If you jadi well, you'll see that as if you decrease it.
The cost of misclassification decreases, so our classifier will lose more mis classifications.
So basically it is changing the whole area into green.
That is, it is classifying all the points as green.
But if I increase the cost of misclassification, our model will start to classify more accurately and
it will give us some maundering within which all the red points situated.
And outside which we have all the green point.
This connotes sigma, which is the gamma, as I told you, larger rally of Gamma means that there is
more impact of nearby points.
So let us let us reduce the value of gamma first.
As you can see initially, when I have very low value of gamma.
Everything is green since we have more green points alone.
So everything is green.
When I start to increase the value of Gamma.
You can see the small red areas coming up near red points only.
So the points which are near the red observations, these will be classified as red.
Since we are increasing the importance of nearby point only if I continue to increase the importance
of nearby points, I start to get a bigger boundary.
But after a certain level, the impact of all individual points will be sorted, used, that a boundary
will start behaving erratically.
So it is important that we find our optimum values of both these hyper barometers, C and Gamma, so
that we get the correct boundary to do classification.