https://medium.com/@monocosmo77/working-with-bayesian-inverse-problems-part5-machine-learning-10527fbd69d9