https://medium.com/@monocosmo77/applications-of-markov-random-fields-part4-machine-learning-cc64819a24c0