Gradient Algorithms for Regularized Optimization