Optimized Machine Learning Methods for Studying the Thermodynamic Behavior of Complex Spin Systems