regularized cost and grad