AbstractCovarianceKernel
- class pmrf.stats.AbstractCovarianceKernel(*, name: str | None = None, metadata: Any = None)
Bases:
ModuleAbstract base class for covariance kernel functions.
These kernels are used in a Gaussian Process for discrepancy modeling.
- __add__(other: AbstractCovarianceKernel) AbstractCovarianceKernel
- abstractmethod __call__(x1: Array, x2: Array, key=None) Array
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
- __mul__(other: AbstractCovarianceKernel | TypeAliasForwardRef('Param') | float) AbstractCovarianceKernel
- gram(x: Array, *, jitter: float = 0.0) Array
Build the Gram (covariance) matrix of this kernel evaluated at
x.Equivalent to
pmrf.stats.covariance_kernels.gram(self, x, jitter=jitter).- Parameters:
x (jnp.ndarray) – The input points, of shape
(N,)or(N, d).jitter (float, default=0.0) – A small scalar added to the diagonal for numerical stability.
- Returns:
The Gram matrix, of shape
(*batch_shape, N, N).- Return type:
jnp.ndarray