0:00
Hey everyone, my name is Asta Chohan, welcome to the Tutorials Point
0:04
In the previous video, we have learned all about the linear regression
0:08
And in this video, we are going to talk about support vector machine
0:12
So let's see what's in for you in this video. We are to look at why support vector machine? What is support vector machine
0:18
What are the technical terms of support vector machines? We are going to understand SVM, what are the advantages of SVM, and what are the applications of support vector machine
0:30
Now let's see why support vector machine. Let's say we have to determine whether the given ball is basketball or football
0:38
So let's build a model and train that on past label data
0:43
And this data is telling the model that this kind of ball is basketball and this kind of ball is football
0:50
So after the training, when we provide some new data to the model, it will predict that it's a basketball
0:58
Now, the question arises how does the prediction work? In this case, we are using support vector machine
1:05
So for understanding this, we have to understand what is support vector machine
1:10
From definition, support vector machine is a powerful and versatile supervised algorithm
1:15
that looks at the data and shorts it into one of the two categories Let understand this in detail with an example Let say we have two categories blue and green And we have plotted these data points on a graph
1:30
Now we have to separate them using a line. So how can we separate these two categories
1:37
We can separate these categories by drawing either of these two lines, red or green
1:43
Now the question arises which line should we choose? In this case, we choose the green line
1:50
Why is that? Before diving into that, let's understand some technical terms of the support vector machine
1:57
First is hyperplane. Hyperplane is the decision boundary that is used to separate the two categories
2:04
Next is support vectors. Support vectors are the closest data points to the hyperplane which makes a critical role in deciding the hyperplane and the margin
2:15
Next very important term is margin. So margin is the distance between the support vector and the hyperplane
2:23
The main objective of the support vector machine is to maximize the margin
2:28
The wider margin indicates the better classification performance. Now let's move to why we have chosen that green line as our hyperplane
2:38
We have hyperplane, we have support vectors. And the distance between the support vector and the hyperplane is called margin
2:44
For having the optimal hyperplane we need the maximum margin distance So let say this margin is our positive margin D plus and this is our negative margin that is D minus
2:57
So we must have the maximum margin. That means the sum of D plus and D minus is maximum
3:05
So we can say that the hyperplane for which the margin is maximum is called the optimal hyperplane
3:12
And that hyperplane gives us the best results. results. Now we had this kind of data set. So we use the hyperplane to segregate them
3:20
But what if the data was not like this. Instead it was like this. In this one kind of
3:26
category falls under the another. And in this case we can't use the hyperplane to separate
3:31
the two categories. So what we are going to do? So for this kind of data set we transform our
3:37
1d plot to the 2d plot and for the transformation what we use is called kernel function. We had data
3:44
set we had 1D plot and we are not able to use the hyperplane in this
3:49
So we transformed that using kernel function into the 2D plot and now we can use the hyperplane
3:55
to separate the two categories. Now how we are going to separate this kind of data set
4:00
We already have 2D plot and one category lies between the another category
4:05
Again, hyperplane does not work for this kind of data set. We can separate this using the hyperplane So what we are going to do Again we are going to transform this 2D plot using kernel into the 3D plot And here from this 3D plot we can observe that we are able to separate two categories using the hyperplane
4:26
Now let's discuss the advantages of support vector machine. First is high dimensional input space. Many problems start taking when we work in high dimensional input space in other algorithms and we need to adjust them. But as
4:40
SVM does that automatically in high dimensional space. One of the high dimensional spaces is called sparse document vectors
4:48
This is where we tokenize the words and the documents. Regularization parameter helps us in determining whether we are going to have the bias or overfitting
4:58
that we have to manage in many other algorithms but SVM naturally does that for us
5:04
Now here are some applications mentioned of the support vector machine. machine, such is face detection, text and hypertext categorization, classification of images
5:14
and bioinformatics. So that was it for this video. We have already discussed the supervised machine learning algorithm, canon algorithm, decision
5:24
tree, linear regression, support vector machine in this video. And we are going to discuss random forests in the next video and rest all the machine learning
5:33
algorithms in further videos. So stay tuned with Tutorials point. Have a nice day and thanks for watching