https://medium.com/@monocosmo77/working-with-bayesian-inverse-problems-part10-machine-learning-8afa5f373733