Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® oneAPI Data Analytics Library & Intel® Data Analytics Acceleration Library
- How can SVM support rbf kernel?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Bin

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-29-2017
07:41 PM

67 Views

How can SVM support rbf kernel?

I try to use rbf kernel in SVM classification in C++.

I just modify the DAALExamples code, svm_two_class_dense_batch.cpp,

Line 49: services::SharedPtr<kernel_function::KernelIface> kernel(new kernel_function::linear::Batch<>());

I change it to services::SharedPtr<kernel_function::KernelIface> kernel(new kernel_function::rbf::Batch<>());

However, the prediction result is much lower than linear kernel. Do I miss something? Also how can I set sigma in rbf kernel used in SVM algorithm? Thanks!

Link Copied

1 Reply

VictoriyaS_F_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-03-2017
10:09 AM

67 Views

Hello Bin,

It is expected that with the default values of RBF parameter sigma and SVM parameter C you get different or even worse predictions than with linear kernel.

To set sigma parameter change the line with the kernel declaration to:

services::SharedPtr<kernel_function::rbf::Batch<> > kernel(new kernel_function::rbf::Batch<>());

And add this code to set sigma parameter to 100.0:

kernel->parameter.sigma = 100.0;

To get a good accuracy with RBF kernel you have to properly choose sigma and C parameters. There are many techniques that allow to find a good combination of those parameters. An example of a practical approach is a grid search among exponentially varying sequences. For example, try all combinations of sigma = (0.0001, 0.01, 1, 100, 10000) and C = (0.0001, 0.01, 1, 100, 10000).

Best regards,

Victoriya

For more complete information about compiler optimizations, see our Optimization Notice.