All Projects → swyoon → pytorch-minimal-gaussian-process

swyoon / pytorch-minimal-gaussian-process

Licence: other
A minimal implementation of Gaussian process regression in PyTorch

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pytorch-minimal-gaussian-process

gp
Differentiable Gaussian Process implementation for PyTorch
Stars: ✭ 18 (-43.75%)
Mutual labels:  gaussian-processes, gaussian-process-regression
bayex
Bayesian Optimization in JAX
Stars: ✭ 24 (-25%)
Mutual labels:  gaussian-process-regression
TrendinessOfTrends
The Trendiness of Trends
Stars: ✭ 14 (-56.25%)
Mutual labels:  gaussian-processes
Stheno.jl
Probabilistic Programming with Gaussian processes in Julia
Stars: ✭ 318 (+893.75%)
Mutual labels:  gaussian-processes
bruno
a deep recurrent model for exchangeable data
Stars: ✭ 34 (+6.25%)
Mutual labels:  gaussian-processes
lgpr
R-package for interpretable nonparametric modeling of longitudinal data using additive Gaussian processes. Contains functionality for inferring covariate effects and assessing covariate relevances. Various models can be specified using a convenient formula syntax.
Stars: ✭ 22 (-31.25%)
Mutual labels:  gaussian-processes
GPJax
A didactic Gaussian process package for researchers in Jax.
Stars: ✭ 159 (+396.88%)
Mutual labels:  gaussian-processes
k2sc
K2 systematics correction using Gaussian processes
Stars: ✭ 15 (-53.12%)
Mutual labels:  gaussian-processes
AutoForce
Sparse Gaussian Process Potentials
Stars: ✭ 17 (-46.87%)
Mutual labels:  gaussian-processes
GPim
Gaussian processes and Bayesian optimization for images and hyperspectral data
Stars: ✭ 29 (-9.37%)
Mutual labels:  gaussian-processes
Universal Head 3DMM
This is a Project Page of 'Towards a complete 3D morphable model of the human head'
Stars: ✭ 138 (+331.25%)
Mutual labels:  gaussian-processes
random-fourier-features
Implementation of random Fourier features for kernel method, like support vector machine and Gaussian process model
Stars: ✭ 50 (+56.25%)
Mutual labels:  gaussian-processes
mnist-challenge
My solution to TUM's Machine Learning MNIST challenge 2016-2017 [winner]
Stars: ✭ 68 (+112.5%)
Mutual labels:  gaussian-processes
sGDML
sGDML - Reference implementation of the Symmetric Gradient Domain Machine Learning model
Stars: ✭ 86 (+168.75%)
Mutual labels:  gaussian-process
FBNN
Code for "Functional variational Bayesian neural networks" (https://arxiv.org/abs/1903.05779)
Stars: ✭ 67 (+109.38%)
Mutual labels:  gaussian-processes
GPBoost
Combining tree-boosting with Gaussian process and mixed effects models
Stars: ✭ 360 (+1025%)
Mutual labels:  gaussian-processes
surfinBH
Surrogate Final BH properties
Stars: ✭ 14 (-56.25%)
Mutual labels:  gaussian-process-regression
models-by-example
By-hand code for models and algorithms. An update to the 'Miscellaneous-R-Code' repo.
Stars: ✭ 43 (+34.38%)
Mutual labels:  gaussian-processes
periodicity
Useful tools for periodicity analysis in time series data.
Stars: ✭ 15 (-53.12%)
Mutual labels:  gaussian-processes
models
Forecasting 🇫🇷 elections with Bayesian statistics 🥳
Stars: ✭ 24 (-25%)
Mutual labels:  gaussian-processes

pytorch-minimal-gaussian-process

In search of truth, simplicity is needed. There exist heavy-weighted libraries, but as you know, we need to go bare bone sometimes. Here is a minimal implementation of Gaussian process regression in PyTorch.

The implementation generally follows Algorithm 2.1 in Gaussian Process for Machine Learning (Rassmussen and Williams, 2006).

Features

  • Gaussian process regression with squared exponential kernel.
  • Hyperparameter optimization via marginal likelihood maximization using Pytorch built-in autograd functionality. (See demo.ipynb)
  • Unittesting using Pytest.

Updates

  • 2022-01-01: Bugfix in predictive variance computation

Dependency

  • Numpy
  • PyTorch
  • PyTest
  • Matplotlib (for demo)

How to Use

from gp import GP

# generate data
X = torch.randn(100,1)
y = torch.sin(X * 2 * np.pi /4). + torch.randn(100, 1) * 0.1
grid = torch.linspace(-5, 5, 200)[:,None]

# run GP
gp = GP()  # you may specify initial hyperparameters using keyword arguments
gp.fit(X, y)
mu, var = gp.forward(grid)

Unittesting

$ pytest

See also

  • GPyTorch: A full-featured Gaussian process package based on PyTorch.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].