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

Clone the repository:

git clone https://github.com/gpmp-dev/gpmp.git

Install in development mode:

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

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.36},
}

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.36.tar.gz (173.7 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.36-py3-none-any.whl (185.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gpmp-0.9.36.tar.gz
  • Upload date:
  • Size: 173.7 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.36.tar.gz
Algorithm Hash digest
SHA256 c581d823bab2560ed2a764469ead07723dfbda1cbca36f997ef71c3c4974444a
MD5 a4d09862f1477ebf2b389cf9bc8e7345
BLAKE2b-256 359b40af14122be1f72a61c8e591cc479c4120af268bbd4a4367e45066e1b280

See more details on using hashes here.

Provenance

The following attestation bundles were made for gpmp-0.9.36.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.36-py3-none-any.whl.

File metadata

  • Download URL: gpmp-0.9.36-py3-none-any.whl
  • Upload date:
  • Size: 185.2 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.36-py3-none-any.whl
Algorithm Hash digest
SHA256 38a73e22ff70fc43a6122af109cecbdd4f71bb811018dda4b85235ca2243ade0
MD5 d9ac4f4638a4b08b99da6ff0b8aa7f54
BLAKE2b-256 b9569cb1417dd8d8551c1df173f813fbf66ab060520b3da7e7c55bca6da706fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for gpmp-0.9.36-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