GPflow manual#
You can use this document to get familiar with GPflow. We’ve split up the material into four different categories: basics, understanding, advanced needs, and tailored models. We have also provided a flow diagram to guide you to the relevant parts of GPflow for your specific problem.
Basics#
This section covers the elementary uses of GPflow, and shows you how to use GPflow for your basic datasets with existing models.
In Basic (Gaussian likelihood) GP regression model and Basic (binary) GP classification model we show how to use GPflow to fit simple regression and classification models [RW06].
In Bayesian Gaussian process latent variable model (Bayesian GPLVM) we cover the unsupervised case, and showcase GPflow’s Bayesian Gaussian Process Latent Variable Model (GPLVM) [TL10].
In each notebook we go over the data format, model setup, model optimization, and prediction options.
Understanding#
This section covers the building blocks of GPflow from an implementation perspective, and shows how the different modules interact as a whole.
GPflow with TensorFlow 2 for handling datasets, training, monitoring, and checkpointing.
Advanced needs#
This section explains the more complex models and features that are available in GPflow.
Models#
MCMC (Markov Chain Monte Carlo): using Hamiltonian Monte Carlo to sample the posterior GP and hyperparameters.
Ordinal regression: using GPflow to deal with ordinal variables.
Gaussian process regression with varying output noise for different data points, using a custom likelihood or the SwitchedLikelihood, and Heteroskedastic Likelihood and Multi-Latent GP.
Multiclass classification for non-binary examples.
Stochastic Variational Inference for scalability with SVGP: using GPflow’s Sparse Variational Gaussian Process (SVGP) model [HMG15] [HFL13]. Use sparse methods when dealing with large datasets (more than around a thousand data points).
A simple demonstration of coregionalization: for when not all outputs are observed at every data point.
Multi-output Gaussian processes in GPflow: more efficient when all outputs are observed at all data points.
Variational Fourier Features in the GPflow framework: how to add new inter-domain inducing variables, at the example of representing sparse GPs in the spectral domain.
Manipulating kernels: information on the covariances that are included in the library, and how you can combine them to create new ones.
Convolutional Gaussian Processes: how we can use GPs with convolutional kernels for image classification.
Faster predictions by caching: how to use caching to speed up repeated predictions.
Features#
Natural gradients: how to optimize the variational approximate posterior’s parameters.
Monitoring Optimisation: how to monitor the model during optimisation: running custom callbacks and writing images and model parameters to TensorBoards.
Tailored models#
This section shows how to use GPflow’s utilities and codebase to build new probabilistic models. These can be seen as complete examples.
Kernel Design: how to implement a covariance function that is not available by default in GPflow. For this example, we look at the Brownian motion covariance.
Mixing TensorFlow models with GPflow: two ways to combine TensorFlow neural networks with GPflow models.
Custom mean functions: metalearning with GPs: how to use a neural network as a mean function.
Mixture Density Networks in GPflow: how GPflow’s utilities make it easy to build other, non-GP probabilistic models.
Theoretical notes#
The following notebooks relate to the theory of Gaussian processes and approximations. These are not required reading for using GPflow, but are included for those interested in the theoretical underpinning and technical details.
Comparing FITC approximation to VFE approximation: why we like the Variational Free Energy (VFE) objective rather than the Fully Independent Training Conditional (FITC) approximation for our sparse approximations.
A Sanity checking when model behaviours should overlap that demonstrates the overlapping behaviour of many of the GPflow model classes in special cases (specifically, with a Gaussian likelihood and, for sparse approximations, inducing points fixed to the data points).