Least Squares in Sampling Complexity and Statistical Learning