https://medium.com/@monocosmo77/working-with-bayesian-inverse-problems-part4-machine-learning-9ba13dfde1ad