API reference¶
GPmp’s primary modeling interface is array-based. Arrays are backend-native
objects 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 is an
optional helper layer 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. For anisotropic Matérn covariances, use
covparam = [log(sigma2), -log(rho_0), ..., -log(rho_{d-1})].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 are backend-native objects. 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.misc.designs module
- gpmp.plot module
- gpmp.misc.testfunctions module