We introduce two super-awesome algorithms! SVM SMO algorithm! And it's hard too!

Source: Internet
Author: User
Tags svm rbf kernel

KKT conditions

First look at how to select parameters. In the SMO algorithm, we select the parameters in turn:

It is a complicated and efficient method to select the sample point which violates the most serious condition of KKT, and to choose the second parameter with its corresponding parameter as the first parameter, but for a simple implementation, the second parameter, even if randomly selected, is not

You can visually understand the many concepts mentioned here in a single graph:

(The painting is a bit messy, forgive me ...) )

There is a black circle outside of the figure is actually the legendary "support vector", its definition will be given at the end of the text

So how exactly should we characterize "violating KKT conditions"? Intuitively, we can have such a simple and effective definition:

Thanks to Numpy's powerful Fancy indexing, the implementation of the above 0 is very good to write (??? ):

As for the second step of the SMO algorithm, as mentioned above, its essence is a constrained two-time planning, although the solution process may be more frustrating, but in fact, not very difficult. Specific steps will be placed at the end of the text, here is temporarily pressed

Effects of SMO

Still look at the training process on the Helix data set first:

It's a little tangled, but it's good.

Let's look at the performance of the mushroom dataset. For this data set alone, the naïve SVM we implement is almost identical to the SVM representation in Sklearn (when using the RBF kernel), the more representative training curve is shown:

It's also an intuitive way to meet SMO, a training method that only takes two parameters at a time to update.

(although these are in Python SVM (ii) · LINEARSVM introduced, but for consistency, here is again introduced again)

Thus, the optimal solution naturally needs to satisfy this condition:

At this point, the introduction of SVM algorithm is almost over. We introduce the "maximal gradient method", the MBGD (Batch gradient descent) method, the kernel method and the SMO algorithm from the perceptual machine, which is a bit of a taste, but it covers something ... It's probably quite a lot.

Hope that the audience can enjoy the master!

Incoming groups: 125240963 to get dozens of sets of PDFs OH

We introduce two super-awesome algorithms! SVM SMO algorithm! And it's hard too!

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.