Linear classifier

Machine learning(6): SVMs
We could see that there is two pictures to show two different points. They are two types in the chart.
We also could use some function to describe the side of reds and blues.
A linear classifier tries to identify which class an example belongs to by making a decision based on the value of a linear combination of the features:
Machine learning(6): SVMs
It also has some advantages and disadvantages:
Machine learning(6): SVMs

Fitting the model

If we get this picture, we also see the two types of points in here and a clear line is divided it.
Machine learning(6): SVMs
In this picture, h(x) > 0 for all training examples belonging to the class r = +1 and h(x) < 0 for all training examples belonging to the class r = −1 .

Fitting the model: 0-1 loss

But in sometimes, we don’t always get this standard situation. So, we need some method to control the result of fitting.
Machine learning(6): SVMs
We could use this function to control the result.
Machine learning(6): SVMs
That is function to add some importance on the examples.
Machine learning(6): SVMs

Margin

Machine learning(6): SVMs
We could see that pictures, there is a space consists of many lines to diveide the area in to two parts, whose function is that:
Machine learning(6): SVMs
The distance of the sides of special area is that:
Machine learning(6): SVMs
When the h(X) = 0, the distance of the closest two different type is :
Machine learning(6): SVMs
So, we could change this distance into another type in math:
Machine learning(6): SVMs

Non-linearly separable classes

If we can’t use line to devide two types in char, we will use the method of Non-linearly to decribe the side of two types.
Machine learning(6): SVMs
Machine learning(6): SVMs

Nonlinear SVMs

For the 3d aspect, if we could use the line to decribe the side of two types, we can also use the nonlinear SVMs to solve this problem.
Machine learning(6): SVMs
For this model, we could also use some math knowledge to make it easy. Then, we could get the limit of this function.
Machine learning(6): SVMs

Kernels

Kernel function is also a useful way to canlulate the liner product.
Machine learning(6): SVMs
Some example to explain it:
Machine learning(6): SVMs

The importance of parameter C

Machine learning(6): SVMs

相关文章: