.. _MaternKernel1: Matérn kernel ------------- Gaussian processes model the correlation (or covariance) between two function values :math:`f(x), f(x')` by means of a covariance function :math:`k(x,x') = k(||x-x'||)`, also called kernel. The kernel is monotonically decreasing for increasing distance :math:`d = ||x-x'||` such that far apart function values are uncorrelated while close-by function values are strongly correlated. The distance :math:`d` between function values is defined as the scaled Euclidean distance .. math:: d = ||x-x'||=\sqrt{\sum_{i=1}^{D}\frac{(x_i−x_i^{'})^{2}}{l_i^{2}}}, where the hyperparameters :math:`l_1,\dots,l_D` determine the characteristic length scales at which the covariance between separated function values becomes negligible. The Matérn covariance function is defined as .. math:: k_{\nu}(x, x') = \frac{\sigma_0^2}{\Gamma(\nu)2^{\nu-1}} \left[\sqrt{2\nu} d \right]^\nu K_\nu\left( \sqrt{2\nu} d\right), where :math:`\sigma_0` is a hyperparameter that determines the standard deviation of possible function values, :math:`K_\nu(\cdot)` is a modified Bessel function, and :math:`\Gamma(\cdot)` is the gamma function. .. _ActiveLearning.Interpolation.matern.matern_order: matern_order (int) """""""""""""""""" For half-integer :math:`\nu` the Matérn functions simplify e.g. to - :math:`k_{1/2}(x,x′)= \sigma^2 \exp(−d)` , - :math:`k_{3/2}(x,x′)= \sigma^2 (1+3-\sqrt{3}d)\exp(-\sqrt{3}d)` , - :math:`k_{5/2}(x,x′)= \sigma^2 (1+5-\sqrt{5}d + \frac{5}{3}d^2)\exp(-\sqrt{5}d)` . A Gaussian process with Matérn covariance is :math:`\lceil \nu \rceil` times differentiable in the mean-square sense. The ``matern_order`` is defined as :math:`m = 2\nu`. Hence, :math:`m=5` is best suited for describing two-times differentiable functions, :math:`m=3` for one-times differentiable functions, and :math:`m=1` for functions, that are not differentiable. Default: ``5`` Choices: ``1``, ``3``, ``5``. .. note:: For ``matern_order=1`` it is not possible to add derivative information.