Skip to content

Kohkernel

KOHKernel(num_field_obs, num_sim_obs, k_eta, k_delta, k_epsilon, k_epsilon_eta)

Bases: AbstractKernel

Kennedy & O'Hagan (2001) kernel. Made up of subkernels which represent different parts of the data.

Source code in .tox/docs/lib/python3.12/site-packages/kohgpjax/kernels/kohkernel.py
def __init__(
    self,
    num_field_obs: int,
    num_sim_obs: int,
    k_eta: AbstractKernel,
    k_delta: AbstractKernel,
    k_epsilon: AbstractKernel,
    k_epsilon_eta: AbstractKernel,
) -> None:
    self.num_field_obs = num_field_obs
    self.num_sim_obs = num_sim_obs
    self.k_eta = k_eta
    self.k_delta = k_delta
    self.k_epsilon = k_epsilon
    self.k_epsilon_eta = k_epsilon_eta

    self.compute_engine: AbstractKernelComputation = KOHKernelComputation()

__call__(x, y)

Parameters:

  • x (Float[Array, ' D']) –

    The left hand argument of the kernel function's call.

  • y (Float[Array, ' D']) –

    The right hand argument of the kernel function's call.

Returns:

  • None

    Float: The value of \(k(x, y)\).

Source code in .tox/docs/lib/python3.12/site-packages/kohgpjax/kernels/kohkernel.py
def __call__(
    self,
    x,  #: Float[Array, " D"],
    y,  #: Float[Array, " D"]
) -> None:  # -> jaxtyping.Float[jaxtyping.Array, "..."]:
    r"""
    Args:
        x (Float[Array, " D"]): The left hand argument of the kernel function's call.
        y (Float[Array, " D"]): The right hand argument of the kernel function's call.

    Returns:
        # Float: The value of $`k(x, y)`$.
    """
    raise NotImplementedError(
        "It is no obvious how to compute the kernel value for this kernel. Instead calculate the desired value by calling one of the components (or subkernels) of this class."
    )