julia> using KernelFunctions: MaternKernel
julia> k = MaternKernel(ν=5)
Matern Kernel (ν = 5, metric = Distances.Euclidean(0.0))
julia> import ForwardDiff as FD
julia> kx(x,y) = FD.derivative(t -> k(x+t, y), 0)
kx (generic function with 1 method)
julia> dk(x,y) = FD.derivative(t -> kx(x, y+t), 0)
dk (generic function with 1 method)
julia> dk(0,0)
0.0
This is wrong, because for a centered GP $Z$ with covariance function $k$
$$dk(x,y) = \partial_x \partial_y k(x,y) = \partial_x \partial_y \mathbb{E}[Z(x),Z(y)] = \mathbb{E}[\partial_x Z(x) \partial_y Z(y)] = \text{Cov}(Z'(x), Z'(y))$$
And $\text{Cov}(Z'(0), Z'(0)) >0$.
$\nu=5$ should be plenty of space for numerical errors since this implies the GP is 5 times differentiable.
This is wrong, because for a centered GP$Z$ with covariance function $k$
And$\text{Cov}(Z'(0), Z'(0)) >0$ .