Skip to content

SeffyVon/GPflow

 
 

Repository files navigation

CircleCI Coverage Status Documentation Status

Website | Documentation (develop/v2.0) | Documentation (v1.5) | Glossary

GPflow is a package for building Gaussian process models in python, using TensorFlow. It was originally created and is now managed by James Hensman and Alexander G. de G. Matthews. The full list of contributors (in alphabetical order) is Alessandro Davide Ialongo, Alexander G. de G. Matthews, Alexis Boukouvalas, Artem Artemev, Daniel Marthaler, David J. Harris, Eric Hambro, Hugh Salimbeni, Ivo Couckuyt, James Hensman, Keisuke Fujii, Mark van der Wilk, Mikhail Beck, Pablo Leon-Villagra, Rasmus Bonnevie, Sergio Pascual-Diaz, ST John, Tom Nickson, Valentine Svensson, Vincent Dutordoir, Zoubin Ghahramani.

GPflow is an open source project. If you have relevant skills and are interested in contributing then please do contact us (see "The GPflow community" section below).

What does GPflow do?

GPflow implements modern Gaussian process inference for composable kernels and likelihoods. The online documentation (develop)/(master) contains more details.

GPflow 2.0 uses TensorFlow 2.0 for running computations, which allows fast execution on GPUs, and uses Python ≥ 3.6.

Install GPflow 2

  • From source

    With the release of TensorFlow 2.1 and Tensorflow Probability 0.9, you should only need to run

    pip install -e .

    in a check-out of the develop branch of the GPflow github repository.

  • Using pip:

    • latest GitHub develop version:

      pip install git+https://github.com/GPflow/GPflow.git@develop#egg=gpflow

      This will automatically install all required dependencies. (Note: as of January 2020, PyPI only has tensorflow 2.x for python 3.6 and 3.7, not for python 3.8, which is the latest release and the Anaconda default.)

    • latest GPflow PyPI package: currently not recommended (the latest version released on PyPI is 2.0.0rc1; this release candidate is missing several bugfixes and improvements, and does not support TensorFlow 2.1) but you can install it as follows:

      pip install gpflow==2.0.0rc1 tensorflow==2.0 tensorflow_probability==0.8

      (replace tensorflow==2.0 with tensorflow-gpu==2.0 for the GPU version)

Install GPflow 1.5.1 (last official release)

Using pip:

pip install 'gpflow<2.0' 'tensorflow<2.0'

GPflow leaves installing tensorflow to the user so that you can choose whether you want the CPU-only or the GPU-support package. Replace tensorflow<2.0 with tensorflow-gpu<2.0 for the GPU version.

Getting Started with GPflow 2.0

Note that GPflow 2.0 has not yet had an official release and interfaces, function signatures, variable names etc. may still change. We welcome and are open to suggestions for how to improve the design of gpflow2!

There is an "Intro to GPflow 2.0" Jupyter notebook; check it out for details. To convert your code from GPflow 1 check the GPflow 2 upgrade guide.

  • GPflow 1.0

    We have stopped development and support for GPflow based on TensorFlow 1.0. We now accept only bug fixes to GPflow 1.0 in the develop-1.0 branch. The latest available release is v1.5.1. Documentation and tutorials will remain available.

The GPflow Community

Getting help

Bugs, feature requests, pain points, annoying design quirks, etc: Please use GitHub issues to flag up bugs/issues/pain points, suggest new features, and discuss anything else related to the use of GPflow that in some sense involves changing the GPflow code itself. You can make use of the labels such as bug, discussion, feature, feedback, etc. We positively welcome comments or concerns about usability, and suggestions for changes at any level of design.

We aim to respond to issues promptly, but if you believe we may have forgotten about an issue, please feel free to add another comment to remind us.

"How-to-use" questions: Please use Stack Overflow (gpflow tag) to ask questions that relate to "how to use GPflow", i.e. questions of understanding rather than issues that require changing GPflow code. (If you are unsure where to ask, you are always welcome to open a GitHub issue; we may then ask you to move your question to Stack Overflow.)

Slack workspace

We have a public GPflow slack workspace. Please use this invite link if you'd like to join, whether to ask short informal questions or to be involved in the discussion and future development of GPflow.

Contributing

All constructive input is gratefully received. For more information, see the notes for contributors.

Projects using GPflow

A few projects building on GPflow and demonstrating its usage are listed below.

Project Description
GPflowOpt Bayesian Optimization using GPflow.
VFF Variational Fourier Features for Gaussian Processes.
Doubly-Stochastic-DGP Deep Gaussian Processes with Doubly Stochastic Variational Inference.
BranchedGP Gaussian processes with branching kernels.
heterogp Heteroscedastic noise for sparse variational GP.
widedeepnetworks Measuring the relationship between random wide deep neural networks and GPs.
orth_decoupled_var_gps Variationally sparse GPs with orthogonally decoupled bases
kernel_learning Implementation of "Differentiable Compositional Kernel Learning for Gaussian Processes".
VBPP Implementation of "Variational Bayes for Point Processes".
DGPs_with_IWVI Deep Gaussian Processes with Importance-Weighted Variational Inference
kerndisc Library for automated kernel structure discovery in univariate data

If you would like your project listed here, let us know - or simply open a pull request that adds your project to the table above!

Compatibility

GPflow heavily depends on TensorFlow and as far as TensorFlow supports forward compatibility, GPflow should as well. The version of GPflow can give you a hint about backward compatibility. If the major version has changed then you need to check the release notes to find out how the API has been changed.

Unfortunately, there is no such thing as backward compatibility for GPflow models, which means that a model implementation can change without changing interfaces. In other words, the TensorFlow graph can be different for the same models from different versions of GPflow.

Citing GPflow

To cite GPflow, please reference the JMLR paper. Sample Bibtex is given below:

@ARTICLE{GPflow2017,
   author = {Matthews, Alexander G. de G. and {van der Wilk}, Mark and Nickson, Tom and
	Fujii, Keisuke. and {Boukouvalas}, Alexis and {Le{\'o}n-Villagr{\'a}}, Pablo and
	Ghahramani, Zoubin and Hensman, James},
    title = "{{GP}flow: A {G}aussian process library using {T}ensor{F}low}",
  journal = {Journal of Machine Learning Research},
  year    = {2017},
  month = {apr},
  volume  = {18},
  number  = {40},
  pages   = {1-6},
  url     = {http://jmlr.org/papers/v18/16-537.html}
}

About

Gaussian processes in TensorFlow

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.7%
  • Other 0.3%