https://medium.com/@monocosmo77/working-with-bayesian-inverse-problems-part9-machine-learning-8965e548523e