rxmc.covariance.kernel_term#

rxmc.covariance.kernel_term(kernel, coords=None, amplitude=None, amplitude_params=(), jitter=1e-10, prefix='discrepancy', support=None) → Term[source]#

A Gaussian-process kernel a a^T * K(x, x; theta) over the support.

One Parameter is auto-derived per free kernel hyperparameter element (sampled in sklearn’s log-theta space): an anisotropic hyperparameter (n_elements > 1) contributes that many parameters. amplitude_params follow the kernel parameters.

Parameters:
  • kernel (sklearn-style kernel) – Duck-typed on hyperparameters, theta, clone_with_theta and __call__.

  • coords (Transform or callable, optional) – Coordinate transform of x the kernel is evaluated in (e.g. angle to momentum transfer). Default: x itself.

  • amplitude (callable or array, optional) – amplitude(c, *amplitude_values) -> vector a; the block becomes outer(a, a) * K. Like the kernel, it sees the transformed coordinate: c.x is coords(x). See constant_amplitude(), exp_growth_amplitude().

  • amplitude_params (sequence of Parameter, optional) – Parameters consumed by amplitude.

  • jitter (float, optional) – Added to the diagonal after scaling, for numerical stability.

  • prefix (str, optional) – Name prefix of the auto-derived kernel parameters.

  • support (array_like of int, optional) – See Term.