https://medium.com/@monocosmo77/working-with-bayesian-inverse-problems-part7-machine-learning-7aca27ec86ef