Statistical Mechanics and Artificial Neural Networks: Principles, Models, and Applications