https://medium.com/@monocosmo77/applications-of-markov-random-fields-part3-machine-learning-91055a830be7