GPmp is a lightweight toolkit for Gaussian process (GP) modeling. It provides essential components for GP-based algorithms, with emphasis on performance, customization, and transparent parameter selection (ML/REML/REMAP), diagnostics, and posterior sampling (MH/NUTS/SMC). Compared with larger GP frameworks, GPmp favors explicit control of modeling choices and robust behavior in practical workflows. On several benchmark settings, this can translate into stronger predictive performance (e.g., Q2/R2), while keeping the implementation compact.
- GP interpolation & regression: supports zero, parameterized, and linear-predictor means (including intrinsic kriging).
- Parameter selection: ML, REML, REMAP, or user-defined criteria.
- Posterior parameter sampling: Metropolis-Hastings (MH), NUTS, and SMC.
- Validation & diagnostics: fast leave-one-out predictions and model diagnosis tools.
- Data handling utilities: random splits, k-fold/repeated CV, and batching.
- Conditional simulation: generate conditional sample paths.
It is up to the user to write the mean and covariance functions for setting a GP model.
However, for the purpose of the example, GPmp provides functions for:
- anisotropic scaling
- distance matrix
- Matérn kernels with half-integer regularities
- parameter selection procedures (ML / REML / REMAP / custom)
- MCMC samplers for parameter posterior exploration (MH / NUTS / SMC)
- data loader helpers for splitting and batching
- model diagnosis
- visualization helper
- ...
GPmp supports two numerical backends:
- NumPy: Default backend; often faster for many small-to-medium workloads.
- PyTorch: Provides automatic differentiation and is most beneficial when gradients are central and/or in higher-dimensional parameter settings.
Backend selection order at import time:
- If GPMP_BACKEND is set to torch or numpy, use it.
- Otherwise: PyTorch if available, else NumPy.
Example: export GPMP_BACKEND=torch
export GPMP_DTYPE=float64
Clone the repository:
git clone https://github.com/gpmp-dev/gpmp.gitInstall in development mode:
pip install -e .Core:
- NumPy
- SciPy
- Matplotlib
Recommended:
- PyTorch
Install PyTorch (CPU-only):
pip install torch
Verify:
python -c "import torch; print(torch.__version__)"
For GPU-enabled PyTorch, install the build matching the local CUDA setup. Use the official PyTorch install selector to obtain the exact pip command.
See the examples/ directory.
Typical steps:
- Provide mean and covariance functions.
- Build a GP model.
- Select parameters (ML / REML / custom criterion) and validate model.
- Predict / cross-validate / sample conditionally / visualize.
GPmp’s documentation is built with Sphinx using the PyData theme. To generate the HTML documentation:
cd docs
make htmlIf you use GPmp in your research, please cite it as follows:
@software{gpmp2026,
author = {Emmanuel Vazquez},
title = {GPmp: the Gaussian Process micro package},
year = {2026},
url = {https://github.com/gpmp-dev/gpmp},
note = {Version x.y},
}Please update the version number as appropriate.
- Expand documentation and tutorials. Improve
See AUTHORS.md for details.
GPmp is free software released under the GNU General Public License v3.0. See LICENSE for more details.