{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# GPflow manual" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "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](GPflows.png) to guide you to the relevant parts of GPflow for your specific problem.\n", "\n", "## Basics\n", "\n", "This section covers the elementary uses of GPflow, and shows you how to use GPflow for your basic datasets with existing models.\n", "\n", " - In [regression.ipynb](basics/regression.ipynb) and [classification.ipynb](basics/classification.ipynb) we show how to use GPflow to fit simple regression and classification models (Rasmussen and Williams, 2006).\n", " - In [gplvm.ipynb](basics/GPLVM.ipynb) we cover the unsupervised case, and showcase GPflow's Bayesian Gaussian Process Latent Variable Model (GPLVM) (Titsias and Lawrence, 2010).\n", "\n", "In each notebook we go over the data format, model setup, model optimisation, and prediction options.\n", "\n", "## Understanding\n", "\n", "This section covers the building blocks of GPflow from an implementation perspective, and shows how the different modules interact as a whole.\n", "\n", "\n", " - [Manipulating models](understanding/models.ipynb)\n", " - [Handling TensorFlow graphs and sessions](understanding/tf_graphs_and_sessions.ipynb)\n", " - [How GPflow relates to TensorFlow: tips and tricks](tips_and_tricks.ipynb)\n", "\n", " \n", "## Advanced needs\n", "\n", "This section explains the more complex models and features that are available in GPflow.\n", "\n", "### Models\n", " - [Markov Chain Monte Carlo (MCMC)](advanced/mcmc.ipynb): using Hamiltonian Monte Carlo to sample the posterior GP and hyperparameters.\n", " - [Ordinal regression](advanced/ordinal_regression.ipynb): using GPflow to deal with ordinal variables.\n", " - [Gaussian process regression with varying output noise](advanced/varying_noise.ipynb) for different data points, using a custom likelihood or the `SwitchedLikelihood`.\n", " - [Multiclass classification](advanced/multiclass_classification.ipynb) for non-binary examples.\n", " - [GPs for big data](advanced/gps_for_big_data.ipynb): using GPflow's Sparse Variational Gaussian Process (SVGP) model (Hensman et al., 2013; 2015). Use sparse methods when dealing with large datasets (more than around a thousand data points).\n", " - [Multi-output models with coregionalisation](advanced/coregionalisation.ipynb): for when not all outputs are observed at every data point.\n", " - [Multi-output models with SVGPs](advanced/multioutput.ipynb): more efficient when all outputs are observed at all data points.\n", " - [Manipulating kernels](advanced/kernels.ipynb): information on the covariances that are included in the library, and how you can combine them to create new ones.\n", "\n", "### Features\n", " - [Natural gradients](advanced/natural_gradients.ipynb): how to optimise the variational approximate posterior's parameters.\n", "\n", " - [Settings and GPflow configuration](advanced/settings.ipynb): how to adjust jitter (for inversion or Cholesky errors), floating point precision, parallelism, and more.\n", " - [Monitoring optimisation](advanced/monitoring.ipynb): how to send things to TensorBoard, store or restore checkpoints, and more.\n", "\n", "## Tailored models\n", "\n", "This section shows how to use GPflow's utilities and codebase to build new probabilistic models.\n", "These can be seen as complete examples.\n", " - [Kernel design](tailor/kernel_design.ipynb): how to implement a covariance function that is not available by default in GPflow. For this example, we look at the Brownian motion covariance.\n", "\n", "\n", "\n", " - [Mixing TensorFlow models with GPflow](tailor/gp_nn.ipynb): two ways to combine TensorFlow neural networks with GPflow models.\n", " - [External mean functions](tailor/external-mean-function.ipynb): how to use a neural network as a mean function.\n", " - [Mixture density network](tailor/mixture_density_network.ipynb): how GPflow's utilities make it easy to build other, non-GP probabilistic models.\n", " \n", "\n", "## Theoretical notes\n", "\n", "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.\n", " - [Derivation of VGP equations](theory/vgp_notes.ipynb)\n", " - [Derivation of SGPR equations](theory/SGPR_notes.ipynb)\n", " - [Comparing FITC approximation to VFE approximation](theory/FITCvsVFE.ipynb): why we like the Variational Free Energy (VFE) objective rather than the Fully Independent Training Conditional (FITC) approximation for our sparse approximations.\n", " - A ['Sanity check' notebook](theory/Sanity_check.ipynb) 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).\n", "\n", "## References\n", "Carl E Rasmussen and Christopher KI Williams. *Gaussian Processes for Machine Learning*. MIT Press, 2006.\n", "\n", "James Hensman, Nicolo Fusi, and Neil D Lawrence. 'Gaussian Processes for Big Data'. *Uncertainty in Artificial Intelligence*, 2013.\n", "\n", "James Hensman, Alexander G de G Matthews, and Zoubin Ghahramani. 'Scalable variational Gaussian process classification'. *Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics*, 2015.\n", "\n", "Michalis Titsias and Neil D Lawrence. 'Bayesian Gaussian process latent variable model'. *Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics*, 2010.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }