Skip to main content

GPlib

A python library for Gaussian Process Regression.

Setup GPlib

  • Create and activate venv

    python3 -m venv .env
    
    source .env/bin/activate
    
  • Upgrade pip

    python -m pip install --upgrade pip
    
  • Install GPlib package

    python -m pip install gplib
    
  • Matplotlib requires to install a backend to work interactively

    (See https://matplotlib.org/faq/virtualenv_faq.html). The easiest solution is to install the Tk framework, which can be found as python-tk (or python3-tk) on certain Linux distributions.

Use GPlib

  • Import GPlib to use it in your python script.

    import gplib
    
  • Initialize the GP with the desired modules.

    gp = gplib.GP(
        mean_function=gplib.mea.Fixed(),
        covariance_function=gplib.ker.SquaredExponential()
    )
    
  • Plot the GP.

    gplib.plot.gp_1d(gp, n_samples=10)
    
  • Generate some random data.

    import numpy as np
    data = {
        'X': np.arange(3, 8, 1.0)[:, None],
        'Y': np.random.uniform(0, 2, 5)[:, None]
    }
    
  • Get the posterior GP given the data.

    posterior_gp = gp.get_posterior(data)
    
  • Finally plot the posterior GP.

    gplib.plot.gp_1d(posterior_gp, data, n_samples=10)
    
  • There are more examples in examples/ directory. Check them out!

Develop GPlib

  • Download the repository using git

    git clone https://gitlab.com/ibaidev/gplib.git
    
  • Update API documentation

    source ./.env/bin/activate
    pip install Sphinx
    cd docs/
    sphinx-apidoc -f -o ./ ../gplib
    

Metadata

Release files for gplib 0.19.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gplib 0.19.2
File Size Uploaded Provenance
gplib-0.19.2.tar.gz 44.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for gplib 0.19.2
File Interpreter ABI Platform
gplib-0.19.2-py3-none-any.whl Python 3 none any Details

Total release size: 133.7 kB

Release files / gplib-0.19.2.tar.gz

Download URL gplib-0.19.2.tar.gz
Size 44.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e3263842d5563c38ddad07f6b8d28f82272f65439b0027192a90a061bf8122d2
BLAKE2b-256 checksum
How to use checksums
e41879a0c554e5fea465420325d51eb4e87cab4b6f3570766fafe3afa06e138a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / gplib-0.19.2-py3-none-any.whl

Download URL gplib-0.19.2-py3-none-any.whl
Size 89.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7cbc605e1f96817c2110d2bb5eb20b788faef3ff300eaa3d79f6abcff9b8a487
BLAKE2b-256 checksum
How to use checksums
68c1e4a2c9afdb911e463295ad9fb83963bb6ea0e67434f303253e3684d837eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for gplib 0.19.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.19.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page