Priors for REMAP selection¶
REMAP selection uses
Only REMAP container classes use the prior objects described here. ML and REML classes do not build these priors.
Inspect and set priors¶
Set prior values before select_params. The example below uses the same
Hartmann4 observations as Getting started:
model = gpc.Model_ConstantMean_Maternp_REMAP(
"hartmann4",
output_dim=problem.output_dim,
mean_specification={"type": "constant"},
covariance_specification={"p": 3},
)
model.set_prior(
gamma=1.5,
sigma2_coverage=0.95,
alpha=1.0,
output_idx=0,
)
model.select_params(xi, zi)
prior = model.get_prior(0)
print(prior)
The resolved prior object is:
LogSigma2AndLogRhoPrior
----
gamma=tensor(1.5000),
sigma2_coverage=tensor(0.9500),
alpha=tensor(1.),
rho_min_range_factor=tensor(0.0500),
logrho_min=tensor([-3.0201, -3.0513, -2.9973, -3.0150]),
covparam0=tensor([0.4397, 0.4234, 0.4547, 0.4007, 0.4183]),
logsigma2_0_prior=None,
logrho_0_prior=None,
log_sigma2_0=tensor(0.4397),
logrho_0=tensor([-0.4234, -0.4547, -0.4007, -0.4183]),
covparam0_param_object= Name: Path Norm Bounds Value Denorm
z0_sigma2: covparam->variance log (-inf, inf) 0.440 1.552
z0_rho_0: covparam->lengthscale log_inv (-inf, inf) 0.423 0.655
z0_rho_1: covparam->lengthscale log_inv (-inf, inf) 0.455 0.635
z0_rho_2: covparam->lengthscale log_inv (-inf, inf) 0.401 0.670
z0_rho_3: covparam->lengthscale log_inv (-inf, inf) 0.418 0.658
The displayed text is produced by print(model.get_prior(0)) after
model.select_params(xi, zi) has resolved the REMAP prior.
get_prior returns the resolved prior object. It raises if called before
select_params has built and resolved the criterion.
When output_idx is omitted, scalar values are applied to every output.
Vector fields such as covparam0_prior and logrho_min are replicated
across outputs unless a list of per-output vectors is provided.
Available prior objects¶
LogSigma2PriorStores the Gaussian prior on
log(sigma^2).LogSigma2AndLogRhoPriorStores the Gaussian prior on
log(sigma^2)and the barrier-linear prior onlogrho.
The default Model_ConstantMean_Maternp_REMAP uses
LogSigma2AndLogRhoPrior.
Log-variance prior¶
The log-variance prior is centered on log_sigma2_0. The user controls its
scale through gamma and sigma2_coverage:
Equivalently,
The additive contribution to the REMAP objective is therefore
up to a constant independent of the covariance parameters.
Larger gamma weakens the regularization. Smaller sigma2_coverage also
weakens it. The anchor can be supplied directly through
logsigma2_0_prior or derived from covparam0_prior.
Log-lengthscale prior¶
The log-lengthscale prior is used by LogSigma2AndLogRhoPrior. It is written
in logrho = log(rho) coordinates. Since the raw covariance vector stores
-log(rho), logrho is obtained by changing sign on the lengthscale
entries of covparam.
The prior combines a lower-support barrier with a linear right-tail penalty. The barrier prevents physical lengthscales from becoming too small. The right-tail penalty regularizes very large physical lengthscales.
For one component, write \(\ell=\log(\rho)\), \(\ell_{\min}=\texttt{logrho_min}\), and \(\ell_0=\texttt{logrho_0}\). The negative-log prior term is
with
This choice makes \(f\) minimal at \(\ell_0\). The full
lengthscale contribution is \(\sum_j f(\log(\rho_j))\). Since
covparam stores -log(rho_j), increasing a raw lengthscale coordinate
decreases \(\log(\rho_j)\).
The main fields are:
logrho_minLower support bound in
logrhocoordinates. Values at or below this bound have infinite negative-log prior.logrho_0Resolved anchor. When it is not supplied directly, it is derived from
covparam0_priorby changing sign on the lengthscale entries.alphaPenalty slope on the large-lengthscale side.
rho_min_range_factorFactor used to set a lower lengthscale safeguard from componentwise input ranges when
logrho_minis not supplied.
When logrho_min is inferred from observations, each component uses
where \(\Delta_j\) is the smallest nonzero spacing in input coordinate \(j\) and \(r_j\) is the observed coordinate range. The range-based safeguard prevents the lower lengthscale bound from collapsing when one spacing is much smaller than the rest of the design.
Resolution policy¶
At criterion construction, the resolved prior is computed as follows:
logsigma2_0_priorandlogrho_0_priortake precedence.Missing anchors are derived from
covparam0_prior.If
covparam0_prioris missing, the anisotropic initial-guess procedure is run on the current observations.Missing
logrho_minis computed from componentwise input ranges andrho_min_range_factor.Missing scalar hyperparameters are read from
gpmp.kernel.prior_defaults.
The resolved object is stored in model[k]["prior"] and returned by
model.get_prior(k).
Checks¶
Use these checks when REMAP behavior is unexpected:
prior = model.get_prior(0)
covparam0_anchor = prior.covparam0
log_sigma2_anchor = prior.log_sigma2_0
logrho_anchor = prior.logrho_0
logrho_min = prior.logrho_min
Compare prior.covparam0 with model[0]["model"].covparam. The first is
the prior anchor. The second is the selected covariance vector.