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]islog(sigma^2).log_sigma2_0 (scalar) – Prior mean for
log(sigma^2).gamma (float, optional) – Multiplicative factor around
sigma2_0used for prior calibration. If None, default fromgpmp.configis used.sigma2_coverage (float, optional) – Central Gaussian probability mass assigned to
[sigma2_0 / gamma, sigma2_0 * gamma]. If None, default fromgpmp.configis 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 fromgammaandsigma2_coverageso 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.configis used.
- Returns:
Componentwise non-negative penalty. Returns
+infwherelogrho <= 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
rhofrom barrier+linear penalty onlogrho.- Parameters:
covparam (array_like) – Covariance parameter vector with inverse length-scales in log-domain:
loginvrho = covparam[1:].logrho_min (array_like) – Lower bound for
logrhocomponents.logrho_0 (array_like) – Reference values for
logrhocomponents.alpha (float, optional) – Linear right-tail slope parameter. If None, default from
gpmp.configis used.
- Returns:
Log-prior value.
- Return type:
scalar
Notes
Induces a prior on lengthscales through
logrho = -loginvrhowith 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_minfrom observation points.The bound combines two componentwise lower bounds and keeps the tightest (largest) admissible one:
log(min nonzero gap)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_defaultsis used.
- Returns:
prior_logrho_min – Safeguarded componentwise lower bound for
logrho.- Return type:
array_like of shape (d,)