https://medium.com/@monocosmo77/working-with-bayesian-inverse-problems-part8-machine-learning-dc087fa2dc1e