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