bebi103.gp.linear_kernel

bebi103.gp.linear_kernel(x1, x2, sigma_b=0.0, sigma=1.0)

Linear kernel. k = sigma_b ** 2 + sigma ** 2 * np.dot(x1, x2)

Parameters
  • x1 (float or array) – Point in the space of covariates.

  • x2 (float or array) – Point in the space of covariates.

  • sigma_b (float, default 0.0) – Offset of linear kernel.

  • sigma (float or array, default 1.0) – scale of linear kernel. If an array, must be of the same length as x1 and x2.

Returns

output – Value of returned by kernel evaluated at x1, x2.

Return type

float