Source: https://marcocuturi.net/Teaching/ENSAE/2017/ISE/ISE2.pdf