LogFrequencyKernel
- class pmrf.stats.LogFrequencyKernel(kernel: AbstractCovarianceKernel, *, name: str | None = None, metadata: Any = None)
Bases:
AbstractCovarianceKernelEvaluate a kernel on log frequency.
$$k(x_1, x_2) = k_text{inner}(ln x_1, ln x_2)$$
A stationary inner kernel depends on the ratio \(x_1/x_2\). For a
CosineKernelwith period \(p\), one cycle spans a factor of \(e^p\) in frequency. The warp needs no frequency unit: rescaling all inputs adds the same constant to their logarithms, leaving stationary inner kernels unchanged. Inputs must be strictly positive.- Parameters:
kernel (AbstractCovarianceKernel) – The kernel evaluated on log frequency. Its batching is preserved.
- __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
- kernel: AbstractCovarianceKernel
The inner kernel.