Skip to content

Reimplementation of linear inequality constraints following Agrell (2019) using GPyTorch.

License

Notifications You must be signed in to change notification settings

ToennisStef/constrained_gps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

constrained_gps

Reimplementation using GPyTorch of the linear inequality constraints algorithm by Agrell (2019) especailly useful to combining it with Bayesian optimization and BoTorch. The original NumPy implementation by the author can be found here.

The main features of this algorithm are:

  • stable numerical compuation using Cholesky factors
  • suitable for multiple constraints (not implemented yet)
  • fast sampling when combining it with Botev (2016) as implementent here.

Feel free to use this code, but don't forget to cite Agrell (2019)!

Also, if you are interested, check out our paper

@inproceedings{brunzema2022controller,
  title={On controller tuning with time-varying bayesian optimization},
  author={Brunzema, Paul and Von Rohr, Alexander and Trimpe, Sebastian},
  booktitle={2022 IEEE 61st Conference on Decision and Control (CDC)},
  pages={4046--4052},
  year={2022},
  organization={IEEE}
}

and the corresponding repo where we build on this code to increase the sample efficiency of controller tuning in a time-varying environment by enforcing convexity constraints in the spatial dimension.

Main difference to the orignal Python implementation

The Python implementation provided here uses the efficient pipeline of GPyTorch in contrast to the NumPy implemenation by the author of the algorithm. This is especially useful, for combining the approach with Bayesian optimization and BoTorch. So far only convexity constraints are possible, but extentions to monotonicity constraints and bounds will follow.

Dependancies

Example

There is a jupyter-notebook provided with a 1D example.

Reference

The implementation is based on the implemenation by author. Furthermore, the implemenation uses the sampling algorithm by Botev (2016).

Agrell, C. (2019), Gaussian processes with lin- ear operator inequality constraints. Journal of Machine Learning Research, 20(135):1–36

Botev, Z. I., (2016), The normal law under linear restrictions: simulation and estimation via minimax tilting, Journal of the Royal Statistical Society Series B, 79, issue 1, p. 125-148

About

Reimplementation of linear inequality constraints following Agrell (2019) using GPyTorch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 82.6%
  • Python 17.4%