Optimal Rates for Regularized Least-Squares Algorithm