gpmp.parameter module

The gpmp.parameter module provides structured objects around covariance-parameter vectors. It assigns names, paths, normalizations, and display metadata to parameters, especially in reports and model-container code.

These objects sit on top of the lower-level GPmp API. The core model and kernel routines remain independent from them: they accept plain arrays for covariance parameters and do not require Param objects.

The module is a display and inspection layer for covariance vectors. Direct calls to gpmp.core and gpmp.kernel use plain arrays and do not require Param objects.

Normalization convention

Param stores normalized values. The supported normalizations are:

  • "none": stored value equals physical value.

  • "log": stored value is log(value).

  • "log_inv": stored value is -log(value).

For the sigma2_rho layout, param_from_covparam_anisotropic(covparam) interprets covparam = [log(sigma2), -log(rho_0), ..., -log(rho_{d-1})] and attaches display names sigma2, rho_0, …

For the matern sigma2_nu_rho layout, param_from_covparam_sigma2_nu_rho(covparam) interprets covparam = [log(sigma2), log(nu), -log(rho_0), ..., -log(rho_{d-1})] and attaches display names sigma2, nu, rho_0, …

Access patterns

Use get_by_name for a named scalar, get_by_path for hierarchical groups, and denormalized_values to inspect physical values. Bounds stored in Param are metadata for display and diagnostics. They are not enforced by Param itself.

Structured parameter objects for GPmp.

This package provides helpers for naming, normalizing, and displaying parameter vectors. The lower-level gpmp.core and gpmp.kernel APIs operate on plain arrays and do not depend on gpmp.parameter.

class gpmp.parameter.Normalization(value)[source]
gpmp.parameter.make_anisotropic_param(d: int | None = None, values: List[float] | ndarray[tuple[Any, ...], dtype[floating]] | None = None, logsigma2_bounds: Tuple[float, float] | None = None, loginvrho_bounds: Tuple[float, float] | None = None, name_prefix: str = '') Param[source]

Build a Param object for anisotropic covariance [sigma2, rho_0, …, rho_{d-1}].

If values is provided, its length must be d + 1. If not, d must be specified and default values [0.0, -1.0, …, -1.0] are used.

Returns a Param object with [log, log_inv, …, log_inv] normalization.

gpmp.parameter.param_from_covparam_sigma2_nu_rho(covparam: List[float] | ndarray[tuple[Any, ...], dtype[floating]], logsigma2_bounds: Tuple[float, float] | None = None, lognu_bounds: Tuple[float, float] | None = None, loginvrho_bounds: Tuple[float, float] | None = None, name_prefix: str = '') Param[source]

Build a Param object for sigma2_nu_rho covariance parameters.

The covariance-parameter convention is [log(sigma2), log(nu), -log(rho_0), ..., -log(rho_{d-1})]. This convention is used by gp.kernel.matern_covariance.