Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Gaussian radial basis function maps the examples into an infinite-dimensional space?

I've just run through the Wikipedia page about SVMs, and this line caught my eyes: "If the kernel used is a Gaussian radial basis function, the corresponding feature space is a Hilbert space of infinite dimensions." http://en.wikipedia.org/wiki/Support_vector_machine#Nonlinear_classification

In my understanding, if I apply Gaussian kernel in SVM, the resulting feature space will be m-dimensional (where m is the number of training samples), as you choose your landmarks to be your training examples, and you're measuring the "similarity" between a specific example and all the examples with the Gaussian kernel. As a consequence, for a single example you'll have as many similarity values as training examples. These are going to be the new feature vectors which are going to m-dimensional vectors, and not infinite dimensionals.

Could somebody explain to me what do I miss?

Thanks, Daniel

like image 628
PDani Avatar asked May 10 '14 13:05

PDani


People also ask

Why is the RBF kernel infinite dimension?

Since the RBF is an infinite sum over such appendages of vectors, we see that the pro- jections is into a vector space with infinite dimension. Recall a kernel expresses a measure of similarity between vectors.

Which kernel can map an input space in infinite dimensional space?

If you've ever been introduced to the theory of machine learning, you might have come across the term kernel methods and how they can transform the original input space into a higher dimensional one (sometimes infinite) in order to perform regression/classification tasks using something called the kernel trick.

What dimension does radial basis kernel take us?

Why Radial Basis Kernel Is much powerful? The main motive of the kernel is to do calculations in any d-dimensional space where d > 1, so that we can get a quadratic, cubic or any polynomial equation of large degree for our classification/regression line.

Which of the following kernel can project data into infinitely many dimensions?

So we can see that a RBF kernel is equivalent to the inner product of two data points that have an infinite number of dimensions.


2 Answers

The dual formulation of the linear SVM depends only on scalar products of all training vectors. Scalar product essentially measures similarity of two vectors. We can then generalize it by replacing with any other "well-behaved" (it should be positive-definite, it's needed to preserve convexity, as well as enables Mercer's theorem) similarity measure. And RBF is just one of them.

If you take a look at the formula here you'll see that RBF is basically a scalar product in a certain infinitely dimensional space

Proof

Thus RBF is kind of a union of polynomial kernels of all possible degrees.

like image 187
Artem Sobolev Avatar answered Sep 21 '22 08:09

Artem Sobolev


The other answers are correct but don't really tell the right story here. Importantly, you are correct. If you have m distinct training points then the gaussian radial basis kernel makes the SVM operate in an m dimensional space. We say that the radial basis kernel maps to a space of infinite dimension because you can make m as large as you want and the space it operates in keeps growing without bound.

However, other kernels, like the polynomial kernel do not have this property of the dimensionality scaling with the number of training samples. For example, if you have 1000 2D training samples and you use a polynomial kernel of <x,y>^2 then the SVM will operate in a 3 dimensional space, not a 1000 dimensional space.

like image 37
Davis King Avatar answered Sep 21 '22 08:09

Davis King