mathematics behind machine learning