HyperAI

Kernel Trick

The kernel trick is a technique that uses the kernel function to directly calculate $latex \langle\phi(x), \phi(z)\rangle $ to avoid calculating $latex \phi(x) $ and $latex \phi(z) $ separately, thereby speeding up the kernel method calculation.

Thanks to the representation of the SVM dual problem, the kernel technique can be applied to SVM, taking the following two formulas as examples:

After using the kernel technique, these two formulas can be rewritten as:

The choice of kernel function is the biggest variable of SVM. If the kernel function is not suitable, $latex \phi $ will not be able to map the input space to a linearly separable feature space.