Math Behind Machine Learning Algorithms