Skip to main content

GPmp: the Gaussian process micro package

Project description

GPmp: the Gaussian Process micro package

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.

Features

  • 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 and particle samplers for parameter posterior exploration (MH / NUTS / SMC)
  • data loader helpers for splitting and batching
  • model diagnosis
  • visualization helper
  • ...

Backends

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 needed and/or in higher-dimensional parameter settings.

Backend selection order at import time:

  1. If GPMP_BACKEND is set to torch or numpy, use it.
  2. Otherwise: PyTorch if available, else NumPy.

Example:

export GPMP_BACKEND=torch
# Optional:
export GPMP_DTYPE=float64

Installation

Install the released package from PyPI:

pip install gpmp

For development, clone the repository and install it in editable mode:

git clone https://github.com/gpmp-dev/gpmp.git
cd gpmp
pip install -e .

Dependencies

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.

Quick start

See the examples/ directory.

Typical steps:

  1. Provide mean and covariance functions.
  2. Build a GP model.
  3. Select parameters (ML / REML / custom criterion) and validate model.
  4. Predict / cross-validate / sample conditionally / visualize.

Documentation

The documentation is available at https://gpmp-dev.github.io/gpmp/.

GPmp’s documentation is built with Sphinx using the Furo theme. To generate the HTML documentation:

cd docs
make html

How to Cite

If 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 0.9.37},
}

Please update the version number when citing another release.

Future Work

  • Expand documentation and tutorials.

Authors

See AUTHORS.md for details.

License

GPmp is free software released under the GNU General Public License v3.0. See LICENSE for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpmp-0.9.37.tar.gz (173.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gpmp-0.9.37-py3-none-any.whl (185.3 kB view details)

Uploaded Python 3

File details

Details for the file gpmp-0.9.37.tar.gz.

File metadata

  • Download URL: gpmp-0.9.37.tar.gz
  • Upload date:
  • Size: 173.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gpmp-0.9.37.tar.gz
Algorithm Hash digest
SHA256 31f360f3f6c2caf5720110f0fdf376d10452631da5b4d2b4f24093a85013e35f
MD5 8ae09c58e6bdbe1be2e6c60d398968b7
BLAKE2b-256 8558c408ba84763e147f5deb6d0c9be35c78afa31ef07312d914eabfc1f09d30

See more details on using hashes here.

Provenance

The following attestation bundles were made for gpmp-0.9.37.tar.gz:

Publisher: publish.yml on gpmp-dev/gpmp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gpmp-0.9.37-py3-none-any.whl.

File metadata

  • Download URL: gpmp-0.9.37-py3-none-any.whl
  • Upload date:
  • Size: 185.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gpmp-0.9.37-py3-none-any.whl
Algorithm Hash digest
SHA256 551acb61d840e21f49d429c510077a3da9e2965360858fd08f2b8cd0b8780b9e
MD5 a3b18240ad4538860654c384cdd99477
BLAKE2b-256 25ecf0cef9e239037f911c6f5317552d57ad0db90bb55cb8bb23f0cf36a1c3d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for gpmp-0.9.37-py3-none-any.whl:

Publisher: publish.yml on gpmp-dev/gpmp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page