https://medium.com/@monocosmo77/working-with-transfer-matrix-part1-machine-learning-2024-701549fb6d09