From First Principles: A Statistical Mechanics Framework for Machine Learning | Synapse