- class lcgp.LCGP(y: ~numpy.ndarray | None = <class 'tensorflow.python.framework.tensor.Tensor'>, x: ~numpy.ndarray | None = <class 'tensorflow.python.framework.tensor.Tensor'>, q: int = None, var_threshold: float = None, diag_error_structure: list = None, parameter_clamp_flag: bool = False, robust_mean: bool = True, submethod: str = 'full', rep_standardize_ybar: bool = True, verbose: bool = False)[source]#
Latent Component Gaussian Process (LCGP)
- Supports two training/prediction paths:
submethod=’full’: uses all observations (x, y)
submethod=’rep’ : groups replicated x rows, uses (x_unique, ybar) structures
- compute_aux_predictive_quantities()[source]#
Compute auxiliary quantities for predictions using full posterior approach.
- init_phi(var_threshold: float = None)[source]#
Initialization of orthogonal basis, computed with SVD. Uses ybar_s if replication, else y.
- neglpost_rep()[source]#
Replicated negative log marginal (up to constants), matching your working rep file.
- lcgp.Matern32(x1, x2, llmb, llmb0, lnug, diag_only: bool = False)[source]#
Returns the Matern 3/2 covariance matrix.
- Parameters:
x1 – input 1 of size (number of inputs in x1, dimension of input)
x2 – input 2 of size (number of inputs in x2, dimension of input)
llmb – log-lengthscale hyperparameter for each dimension
llmb0 – log-scale hyperparameter
lnug – parameter to tune the nugget, nugget = exp(lnug) / (1 + exp(lnug))
diag_only – returns diagonal of covariance matrix if True. Default to False.
- Returns:
covariance matrix of size (n1, n2)