gpmp.kernel priors

Prior terms are used by REMAP selection procedures. Prior functions return log-prior values. Posterior objective wrappers combine these terms with the negative restricted likelihood and return negative log posterior values to minimize.

Gaussian prior on log variance

log_prior_gaussian_logsigma2 defines a Gaussian prior on log(sigma2). In the REMAP helpers, the center is usually anchored at a reference covariance vector, while the scale is calibrated by the gamma and sigma2_coverage hyperparameters.

log_prior_gaussian_logsigma2

gpmp.kernel.log_prior_gaussian_logsigma2(covparam, log_sigma2_0, gamma=None, sigma2_coverage=None)[source]

Compute Gaussian log-prior on log(sigma^2).

Parameters:
  • covparam (array_like) – Covariance parameter vector. covparam[0] is log(sigma^2).

  • log_sigma2_0 (scalar) – Prior mean for log(sigma^2).

  • gamma (float, optional) – Multiplicative factor around sigma2_0 used for prior calibration. If None, default from gpmp.config is used.

  • sigma2_coverage (float, optional) – Central Gaussian probability mass assigned to [sigma2_0 / gamma, sigma2_0 * gamma]. If None, default from gpmp.config is used.

Returns:

Gaussian log-prior value (up to an additive normalization constant).

Return type:

scalar

Notes

The standard deviation in log(sigma^2) is derived from gamma and sigma2_coverage so that:

P(sigma^2 in [sigma2_0 / gamma, sigma2_0 * gamma]) = sigma2_coverage.

This is a weakly informative regularization prior.

Log lengthscale barrier and linear penalty

The log-lengthscale prior is designed to prevent degenerate noise-model-like solutions where lengthscales become too small, while also penalizing overly large lengthscales. It is expressed on logrho = log(rho). GPmp stores -log(rho) in covparam.

neglog_f_logrho

gpmp.kernel.neglog_f_logrho(logrho, logrho_min, logrho_0, alpha=None)[source]

Compute elementwise barrier + linear-tail penalty on logrho.

Parameters:
  • logrho (array_like) – Log-lengthscale vector.

  • logrho_min (array_like) – Componentwise hard lower bound.

  • logrho_0 (array_like) – Componentwise reference value (penalty minimum).

  • alpha (float, optional) – Linear right-tail slope parameter of the penalty. If None, default from gpmp.config is used.

Returns:

Componentwise non-negative penalty. Returns +inf where logrho <= logrho_min.

Return type:

array_like

Notes

This is a structural regularization penalty (barrier + tail control), not a Jeffreys/reference prior.

log_prior_logrho_barrier_linear

gpmp.kernel.log_prior_logrho_barrier_linear(covparam, logrho_min, logrho_0, alpha=None)[source]

Compute log-prior on rho from barrier+linear penalty on logrho.

Parameters:
  • covparam (array_like) – Covariance parameter vector with inverse length-scales in log-domain: loginvrho = covparam[1:].

  • logrho_min (array_like) – Lower bound for logrho components.

  • logrho_0 (array_like) – Reference values for logrho components.

  • alpha (float, optional) – Linear right-tail slope parameter. If None, default from gpmp.config is used.

Returns:

Log-prior value.

Return type:

scalar

Notes

Induces a prior on lengthscales through logrho = -loginvrho with hard lower support and linear tail regularization.

compute_logrho_min_from_xi

gpmp.kernel.compute_logrho_min_from_xi(xi, prior_rho_min_range_factor=None)[source]

Compute safeguarded componentwise prior_logrho_min from observation points.

The bound combines two componentwise lower bounds and keeps the tightest (largest) admissible one:

  1. log(min nonzero gap)

  2. log(range * prior_rho_min_range_factor)

Parameters:
  • xi (array_like of shape (n, d)) – Observation points.

  • prior_rho_min_range_factor (float, optional) – Safeguard factor for the range-based lower bound. If None, the default configured in gpmp.kernel.prior_defaults is used.

Returns:

prior_logrho_min – Safeguarded componentwise lower bound for logrho.

Return type:

array_like of shape (d,)

Bounds helpers

empirical_bounds_factory

gpmp.kernel.empirical_bounds_factory(xi, zi, *, mean_paramlength=0, var_lower_factor=2.0, var_upper_factor=10.0, length_lower_factor=2.0)[source]

Build bounds for params [mean…, log(sigma2), -log(rho_1), …, -log(rho_d)].