Add regularized linear regression gradient function.