Gaussian processes with arbitrary kernels
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kern_gp-0.1.2.tar.gz.
File metadata
- Download URL: kern_gp-0.1.2.tar.gz
- Upload date:
- Size: 127.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6295810a7725579bfaabc81c3f45ba6142414ca6cb3fca547d3dc599cee01945
|
|
| MD5 |
f645bf78d29208ea524c775d153347da
|
|
| BLAKE2b-256 |
86fc50076c3aa16ce52e1c679b983e08cca9bf391db01ae9017372fef287528b
|
Provenance
The following attestation bundles were made for kern_gp-0.1.2.tar.gz:
Publisher:
publish.yml on AustinT/kernel-only-GP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kern_gp-0.1.2.tar.gz -
Subject digest:
6295810a7725579bfaabc81c3f45ba6142414ca6cb3fca547d3dc599cee01945 - Sigstore transparency entry: 1437488122
- Sigstore integration time:
-
Permalink:
AustinT/kernel-only-GP@9482632f2b7d3290f317fab0e1be034e241323ce -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/AustinT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9482632f2b7d3290f317fab0e1be034e241323ce -
Trigger Event:
push
-
Statement type:
File details
Details for the file kern_gp-0.1.2-py3-none-any.whl.
File metadata
- Download URL: kern_gp-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
671563395904ec1ff7d30691b00ea0eb42b8fc821a643fe5b43bb122075e2657
|
|
| MD5 |
71ef76813819fdf0d469d6f9d0cffbee
|
|
| BLAKE2b-256 |
20166e18270f3405aed08985a0ca03d75163deac55a42dbee9d332076b263125
|
Provenance
The following attestation bundles were made for kern_gp-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on AustinT/kernel-only-GP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kern_gp-0.1.2-py3-none-any.whl -
Subject digest:
671563395904ec1ff7d30691b00ea0eb42b8fc821a643fe5b43bb122075e2657 - Sigstore transparency entry: 1437488380
- Sigstore integration time:
-
Permalink:
AustinT/kernel-only-GP@9482632f2b7d3290f317fab0e1be034e241323ce -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/AustinT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9482632f2b7d3290f317fab0e1be034e241323ce -
Trigger Event:
push
-
Statement type: