ProductKernel

class pmrf.discrepancy_models.kernels.ProductKernel(k1: CovarianceKernel, k2: CovarianceKernel, *, name: str | None = None)

Bases: CovarianceKernel

Kernel representing the product of two kernels.

Variables:
  • k1 (Kernel) – First kernel operand.

  • k2 (Kernel) – Second kernel operand.

__call__(x1, x2, key=None)

Evaluate the kernel between two points.

Parameters:
  • x1 (jnp.ndarray) – First input point.

  • x2 (jnp.ndarray) – Second input point.

  • key (jax.random.PRNGKey, optional) – Random key for stochastic kernels.

Returns:

Kernel covariance scalar.

Return type:

jnp.ndarray

k1: CovarianceKernel
k2: CovarianceKernel