API reference¶
GPmp routines take arrays managed by gpmp.num: NumPy arrays with the
NumPy backend and PyTorch tensors with the torch backend. The gpmp.core
module defines the GP model object, and gpmp.kernel provides
covariance functions and parameter-selection procedures that operate on
plain covariance-parameter vectors. The gpmp.parameter module provides
objects for naming, normalizing, displaying, and inspecting these vectors.
gpmp.core and gpmp.kernel do not depend on it.
Common API conventions¶
Use these conventions when calling the API programmatically.
Observation points are arrays
xiwith shape(n, d).Scalar observations are arrays
ziwith shape(n,)or(n, 1).Prediction points are arrays
xtwith shape(m, d).Covariance parameters are one-dimensional arrays. The
sigma2_rholayout iscovparam = [log(sigma2), -log(rho_0), ..., -log(rho_{d-1})]. It is used by covariance functions parameterized by a variance and anisotropic lengthscales. Thematernsigma2_nu_rholayout addslog(nu)afterlog(sigma2).Selection procedures modify
model.covparamand return(model, info)wheninfo=True. Withinfo=False, they return(model, None).Use
gpmp.numarrays or objects convertible bygpmp.num.asarray. Unless a function documents a conversion, outputs use the array type of the active numerical backend. Usegpmp.num.to_npwhen NumPy arrays are needed outside GPmp.Write custom mean, covariance, and criterion functions with
gpmp.numoperations when they must work with both backends.
Module order¶
- gpmp.num module
- gpmp.core module
- gpmp.kernel module
- gpmp.parameter module
- gpmp.modeldiagnosis module
- Typical inputs
- Main diagnostics
- Public API
Unnormalized1DDistributioncompute_performance()describe_array()diag()fast_univariate_stats()make_single_param_criterion_function()model_diagnosis_disp()modeldiagnosis_init()perf()pretty_print_dictionary()pretty_print_dictionnary()selection_criterion_statistics()selection_criterion_statistics_fast()sigma_rho_from_covparam()
- gpmp.mcmc module
- gpmp.dataloader module
- gpmp.misc.designs module
- gpmp.plot module
- gpmp.misc.testfunctions module