Phase Transitions in Machine Learning