bebi103.gp.cov_from_kernel

bebi103.gp.cov_from_kernel(X1, X2, kernel, **kernel_params)

Return covariance matrix for specified kernel.

Parameters
  • X1 (1D, shape (n,) or 2D array, shape (n, d)) – Array of n points to compute kernel. If a 1D array, assume the points are one-dimensional. If a 2D array, assume the points are d-dimensional.

  • X2 (1D, shape (m, ) or 2D array, shape (m, d) or None) – Array of m points to compute kernel. If a 1D array, assume the points are one-dimensional. If a 2D array, assume the points are d-dimensional. If None, assume m = 0 in output.

  • kernel (function) – Function of the form kernel(x1, x2, **kernel_params) that returns as scalar value that is the kernel evaluated at points x1, x2.