pystra.active_learning.pc_kriging.PCKrigingSurrogate#
Use it: User guide · Worked example · Theory
- class PCKrigingSurrogate(*, degree=(1, 2, 3), q_norm=1.0, max_interaction=None, length_scale=1.0, correlation='matern52', optimize=True, noise=1e-08, n_restarts=0, seed=None)[source]#
Bases:
SurrogateSequential sparse PC-Kriging in independent normal coordinates.
- Parameters:
degree (
int|Sequence[int]) – Sparse Hermite trend candidates; default (1, 2, 3).q_norm (
float) – Hyperbolic truncation, default 1.max_interaction (
int|None) – Maximum polynomial interaction order.correlation (
str) – ‘matern52’ (default, consistent with KrigingSurrogate) or ‘gaussian’.length_scale (
float|Sequence[float]) – Initial correlation scales, default 1; a scalar is broadcast across dimensions. Fixed scales are possible withoptimize=False.optimize (
bool) – Default True: fit anisotropic scales by profiled maximum likelihood. Bounds are [0.01, 100] in standard-normal coordinate units.noise (
float) – Positive relative diagonal nugget, default 1e-8. Predictions describe the latent response, excluding new observation noise.n_restarts (
int) – Additional random optimizer starts, default 0. Failed optimization raises RuntimeError; it cannot silently produce a successful fit.seed (
int|None) – Local generator seed for additional optimization starts.
Notes
The sparse trend is selected before optimizing the correlation model; this is sequential PC-Kriging, not optimal PC-Kriging’s search along every LAR support. GLS re-estimates the trend for each correlation candidate. Universal predictive variance includes trend-estimation uncertainty. Exactly representable training data yield zero residual process variance; this does not certify correctness outside the observations. Requires only NumPy/SciPy, with row-wise input points and scalar responses.
Methods
Replace fitted state; errors leave prediction unavailable.
Return universal mean/std conditional on fitted trend and scales.