Skip to content

ToennisStef/gp_constraint_Agrell

Repository files navigation

GPConstr - Gaussian Process regression with linear operator constraints

Python module for constrained GP regression.

Code based on the paper C. Agrell (2019) Gaussian processes with linear operator inequality constraints. The current implementation covers boundedness of the function to estimate, combined with bounds on its first order partial derivatives, using the RBF or Matérn5/2 kernel.

Prerequisites

Besides the standard numpy/scipy libraries, rpy2 is used to access some useful R packages for working with the truncated multivariate normal distribution. The code has been tested with the following requirements:

Python 3 (3.6.3 64bit)

  • numpy (1.14.0)
  • scipy (1.1.0)
  • pandas (0.22.0)
  • sklearn (0.19.1) Only uses the function sklearn.metrics.pairwise.euclidean_distances from this package for fast computation of Gram matrices (and could easily be replaced by custom code if needed)
  • rpy2 (2.8.6) Used to acces R for computation involving the truncated multivariate normal. See the Python wrapper in '/GPConstr/r_functions/' for details

R (3.4.3)

  • tmvtnorm (1.4.10)
  • mvtnorm (1.0.7)
  • TruncatedNormal (1.0)
  • truncnorm (1.0.8)

Examples

Some examples are given in jupyter notebooks. pyDOE is used to generate training data, and plots are created using plotly with some custom plotting functions for GPs.

Further work

We will be including other types of constraints and kernels as needed, either buidling on the current implementation or on a suitable GP library with good functionality for kernel manupulation such as e.g. GPflow

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages