Replies: 1 comment 1 reply
-
Your snippet has an issue ( The formula for the Matern kernel is given here:
That is probably one of the reason why you don't find the same result. The fact that in the RBF case the 2-d kernel is a product of 2 1-d kernels is specific to the RBF kernel. You need to compute Note that by default in scikit-learn Matern implementation, Good luck! |
Beta Was this translation helpful? Give feedback.
-
Hello scikit-learn community,
I wonder about multivariate Gaussian Proceess and more specifically on kernel definition for Multivariate cases.
For discussion I provide the MWE hereafter that compute the kernel values (
k_val1
) with sklearn defined functions and explicitly (k_val2
), as I think it should works, but obviously I am making a mistake ...I can't figure out the results.
With the RBF kernel, both kernel definitions give the same values (array
k_val1=k_val2
). My intuition is in the multivariate kernel is the product of 2 univariate RBF kernels. When I try with the Matern32 kernel, results differ.To detail the background,, I would like to express derivatives of the learned function and to that purpose I need to derive the kernel with repect to the parameters
X[:,0]
andX[:,1]
. In 1d, it works as in 2d with the above multivariate RBF kernel. As the derivation of the multivariate Marten32 kernel is probably misunderstood, I have problems with this case.If someone can enlighten me on the definition of the covariance matrix for multivariate cases, I will be very grateful.
Best regards,
Beta Was this translation helpful? Give feedback.
All reactions