Skip to content
Machine Learning

Name three types of kernels in SVM.

Linear, polynomial and RBF (radial basis function), with sigmoid a fourth. A kernel computes inner products in a higher-dimensional space without ever building that space, so linear is the default for wide sparse text and RBF for low-dimensional, curved boundaries.

datasciencetrivia.com

Card 1 of 259. Answer: Linear, polynomial and RBF (radial basis function), with sigmoid a fourth. A kernel computes inner products in a higher-dimensional space without ever building that space, so linear is the default for wide sparse text and RBF for low-dimensional, curved boundaries.

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

Three common SVM kernels are linear, polynomial and the radial basis function (RBF); sigmoid is a fourth. A kernel returns the inner product of two points after a feature mapping φ, K(x, z) = φ(x)·φ(z), so the SVM finds a linear boundary in the mapped space without computing φ. Polynomial is (γ x·z + r)ᵈ and RBF is exp(−γ ‖x − z‖²).

Take the kernel (x·z)² with x = (1, 2) and z = (3, 1): x·z = 5, so K = 25. The map φ(x) = (x₁², √2 x₁x₂, x₂²) gives (1, 2√2, 4) and (9, 3√2, 1), whose dot product is 9 + 12 + 4 = 25: the same number, without building the vectors. The RBF kernel's φ is infinite-dimensional, so only the kernel can use it.

To choose, use linear when features far outnumber samples, as with TF-IDF text; otherwise start with RBF, scikit-learn's default. Tune C and γ on a log grid; a large γ makes the boundary wiggly. Scale features first. The sigmoid kernel, tanh(γ x·z + r), is not positive semi-definite for all parameters and is rarely used.

All questions