Mathematical Foundations of Data Science