Kernel only GP
A minimal Python package for GP inference given only kernel matrices — not the underlying data points. Useful when working with data that cannot be stored as a tensor.
Usage
import jax.numpy as jnp
import kern_gp
# Kernel matrices (e.g. from an RBF kernel evaluated on your data)
# In this package, *these* are the GP inputs (not the data)
k_train_train = jnp.array([[1.0, 0.8], [0.8, 1.0]])
k_test_train = jnp.array([[0.6, 0.9]])
k_test_test = jnp.array([[1.0]])
y_train = jnp.array([1.2, 0.8])
# Hyperparameters: output scale and noise variance
a = 1.0 # output scale
s = 0.01 # noise variance
# Marginal log likelihood (useful for training / hyperparameter selection)
mll = kern_gp.mll_train(a, s, k_train_train, y_train)
# Posterior mean and covariance at test points (noise not added back)
mean, covar = kern_gp.noiseless_predict(a, s, k_train_train, k_test_train, k_test_test, y_train)
The kernel matrices should use the base kernel (without the output scale a). The full GP kernel is a·k(x,x') + s·I, where s is the noise variance.
Installation
pip install kern-gp
Development
# Install all deps (including dev group)
uv sync
# Install pre-commit hooks
uv run pre-commit install
# Run tests
uv run pytest
Release files for kern-gp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kern_gp-0.1.2.tar.gz | 127.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kern_gp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 131.9 kB
Release files / kern_gp-0.1.2.tar.gz
| Download URL | kern_gp-0.1.2.tar.gz |
|---|---|
| Size | 127.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6295810a7725579bfaabc81c3f45ba6142414ca6cb3fca547d3dc599cee01945
|
|
BLAKE2b-256 checksum How to use checksums |
86fc50076c3aa16ce52e1c679b983e08cca9bf391db01ae9017372fef287528b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 4, 2026.
Transparency logRelease files / kern_gp-0.1.2-py3-none-any.whl
| Download URL | kern_gp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
671563395904ec1ff7d30691b00ea0eb42b8fc821a643fe5b43bb122075e2657
|
|
BLAKE2b-256 checksum How to use checksums |
20166e18270f3405aed08985a0ca03d75163deac55a42dbee9d332076b263125
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 4, 2026.
Transparency log