5
$\begingroup$

In my university course slide, regarding the exponential and Gaussian kernel there are these two relevant pictures. They show the prior function of each kernel: enter image description here

You can see that the resulting prior of the gaussian kernel is smooth (because the kernel is differentiable at 0), while in the exponential case this is not true and thus the resulting prior is not smooth at all.

I was looking for similar pictures regarding other kernels like a constant kernel,a linear kernel and polynomial kernel, to get a better intuition of the type of prior function that these kernels have, but I haven't found anything.

Do you know any resource online where can I find those? Or can you give me a description of the resulting priors in this cases?

$\endgroup$
1
  • $\begingroup$ I think I have realized that the following will happen: constanct kernel --> constant line, linear kernel --> linear line, polynomial kernel ---> polynomial line $\endgroup$ Jan 12, 2019 at 17:59

1 Answer 1

3
$\begingroup$

Although thinking out the math as you've apparently done is of course also good, it's actually pretty straightforward to make these kinds of pictures: just take some points $\mathbf X$, construct a kernel matrix $\mathbf K$ on them, and then sample from $\mathcal N(\mathbf 0, \mathbf K)$, like in this notebook.

Gaussian / exponentiated quadratic kernel:

Smooth, wiggly functions

Exponential kernel:

Non-smooth wiggly functions

Constant kernel:

Horizontal lines

Linear kernel:

Straight lines with different slopes

Homogenous quadratic kernel, $k(x, y) = (x y)^2$:

Quadratic curves passing through the origin

Inhomogeneous quadratic kernel, $k(x, y) = (x y + 1)^2$:

Quadratic curves not passing through the origin

Inhomogeneous cubic kernel, $k(x, y) = (x y + 1)^3$:

Cubic curves

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.