Skip to main content

Extends GPyTorch with Gaussian Process Regression Conformal Prediction

Reason this release was yanked:

Superseded by 0.2.0.post1 (metadata fix / Python requirement).

Project description

GPyConform

Python Version PyPI Version Conda Version GitHub (Pre-)Release Date Documentation Status License Downloads

GPyConform extends the GPyTorch library by implementing Conformal Prediction (CP) for Gaussian Process Regression (GPR), providing distribution-free, finite-sample valid Prediction Intervals (PIs) under the sole assumption of data exchangeability.

GPyConform supports both the Transductive (Full) CP and Inductive (Split) CP versions of the framework through a unified interface. In both cases it implements a GPR-specific normalized nonconformity measure [1] that leverages the GP predictive variance to construct adaptive symmetric or asymmetric conformal prediction intervals.

Key Features

  • Provably Valid Prediction Intervals: Distribution-free, finite-sample coverage guarantees under minimal assumptions (data exchangeability).
  • Two CP Framework Versions:
    • Transductive (Full) CP for Exact GPs: ExactGPCP
    • Inductive (Split) CP for any GPyTorch regression model: GPRICPWrapper, plus a model-agnostic InductiveConformalRegressor
  • Symmetric and Asymmetric PIs in both frameworks.
  • Normalized Nonconformity that leverages the GP predictive variance for tighter, adaptive intervals.
  • Unified PI Container + Metrics: PredictionIntervals supports retrieving intervals at multiple confidence levels and evaluating empirical coverage error and interval widths.
  • Torch-native + GPU-friendly: Works directly with torch.Tensors and can leverage GPU acceleration.

Note

  • Transductive CP (ExactGPCP) targets ExactGP models with GaussianLikelihood and relies on an internal patch to GPyTorch’s DefaultPredictionStrategy (applied automatically by default). You can control patching via the GPYCONFORM_AUTOPATCH environment variable, or call gpyconform.apply_patches() manually.
  • Inductive CP does not modify the model internals and can be used with any GPyTorch regression model (including approximate/deep GPs and different likelihoods). InductiveConformalRegressor can also be used with non-GPyTorch regressors that provide predictive means/variances.

Documentation

For detailed documentation and usage examples, see GPyConform Documentation.

Installation

From PyPI

pip install gpyconform

From conda-forge

conda install conda-forge::gpyconform

Citing GPyConform

If you use GPyConform for a scientific publication, you are kindly requested to cite the following paper:

Harris Papadopoulos. "GPyConform: Conformal Prediction with Gaussian Process Regression in Python". In: K. An Nguyen, Z. Luo (eds), The Importance of Being Learnable, Lecture Notes in Computer Science, vol. 16290, pp. 449–466. Springer, 2026. DOI: 10.1007/978-3-032-15120-9_20.

Bibtex entry:

@Inbook{gpyconform,
author="Papadopoulos, Harris",
editor="An Nguyen, Khuong and Luo, Zhiyuan",
title="GPyConform: Conformal Prediction with Gaussian Process Regression in Python",
bookTitle="The Importance of Being Learnable: Essays Dedicated to Alexander Gammerman",
year="2026",
publisher="Springer Nature Switzerland",
address="Cham",
pages="449--466",
isbn="978-3-032-15120-9",
doi="10.1007/978-3-032-15120-9_20",
url="https://doi.org/10.1007/978-3-032-15120-9_20"
}

For the Gaussian Process Regression Conformal Prediction approach and nonconformity measure, please also cite:

Harris Papadopoulos. "Guaranteed Coverage Prediction Intervals with Gaussian Process Regression", IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 46, no. 12, pp. 9072-9083, Dec. 2024. DOI: 10.1109/TPAMI.2024.3418214. (arXiv version)

Bibtex entry:

@ARTICLE{gprcp,
  author={Papadopoulos, Harris},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  title={Guaranteed Coverage Prediction Intervals with Gaussian Process Regression}, 
  year={2024},
  volume={46},
  number={12},
  pages={9072-9083},
  doi={10.1109/TPAMI.2024.3418214}
}

References

[1] Harris Papadopoulos. "Guaranteed Coverage Prediction Intervals with Gaussian Process Regression", IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 46, no. 12, pp. 9072-9083, Dec. 2024. DOI: 10.1109/TPAMI.2024.3418214. (arXiv version)

[2] Vladimir Vovk, Alexander Gammerman, and Glenn Shafer. Algorithmic Learning in a Random World, 2nd Ed. Springer, 2023. DOI: 10.1007/978-3-031-06649-8.

[3] Harris Papadopoulos. "GPyConform: Conformal Prediction with Gaussian Process Regression in Python". In: K. An Nguyen, Z. Luo (eds), The Importance of Being Learnable, Lecture Notes in Computer Science, vol. 16290, pp. 449–466. Springer, 2026. DOI: 10.1007/978-3-032-15120-9_20.


Author: Harris Papadopoulos (h.papadopoulos@frederick.ac.cy) / Copyright 2024-2026 Harris Papadopoulos / License: BSD 3 clause

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

gpyconform-0.2.0.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

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

gpyconform-0.2.0-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file gpyconform-0.2.0.tar.gz.

File metadata

  • Download URL: gpyconform-0.2.0.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for gpyconform-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b7709f6ab012450d7afdfc26d6af6be96fcb58d1a8faf08d7e0abaaf44fd64c8
MD5 811c9d18f333ae44ad0af48f48d12c8e
BLAKE2b-256 0309f8259b9c89aa62db9bee6f89aeaf2aa0742bf5b6690a691b674df7bfc4fd

See more details on using hashes here.

File details

Details for the file gpyconform-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: gpyconform-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for gpyconform-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07b92e2bbdd65f28c3bc2494cb1f85835c194cfd851d351e89317fef25d3c65d
MD5 d5148370056082f4e8e46bfd767a1d2e
BLAKE2b-256 b1770a0a16c72914443f38cf90e7a5824a3db01107244d2e9458c0abc0e6a23f

See more details on using hashes here.

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