# Gaussian Processes, Prior function of constant, Linear and Polynomial Kernel

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:

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?

• I think I have realized that the following will happen: constanct kernel --> constant line, linear kernel --> linear line, polynomial kernel ---> polynomial line Jan 12, 2019 at 17:59
• Check out a collection of kernels at gpss.cc/gpss21/slides/Durrande2021.pdf Apr 25 at 9:08

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:

Exponential kernel:

Constant kernel:

Linear kernel:

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

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

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