Soft-margin SVM

Source: Internet
Author: User
Tags svm

Consider this situation:

If we use Hard-margin SVM and do not tolerate a little error, we will get the result on the right. Obviously, the result on the left is more reasonable, so in practice we use a SVM that can accept a certain error (tolerate noise), namely: Soft-margin SVM.

Combine two conditions to:

There are several problems with this:

One is that our objective function is no longer linear, so we cannot use QP, and the second is that we treat large errors and small errors equally.

So we'll change ∞ to ε:

(This is also a question: ε is different for each data, and even becomes a target variable.) Not very easy to understand)

Now the form of Soft-margin SVM has been clarified, how to solve?

1. According to the process of solving duality problem which we deduced in Hard-margin SVM, we can get the following results, and also have primal-innner optimal (complementary slackness) in kkt condition.

Solving:

The question here is how does B get it? According to the previous Primal-innner optimal conditions:

at this point, the solution process of Soft-margin SVM is finished .

Previously Hard-margin we divided all the data points into support vectors and general vectors based on the value of Alpha.
Now there are three cases of α in soft-margin, which can be divided into three categories:

For Gaussian kernel functions, how to select the appropriate C and gamma?

You can use validation. You can also use #sv because:

The difference between using the two choices is as follows:

Soft-margin SVM

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.