def squared_error_ridge_gradient(x_i, y_i, beta, alpha):
 return vector_add(squared_error_gradient(x_i, y_i, beta), ridge_penalty_gradient(beta, alpha))

def squared_error_ridge_gradient ( x_i , y_i , beta , alpha ) : return vector_add ( squared_error_gradient ( x_i , y_i , beta ) , ridge_penalty_gradient ( beta , alpha ) )
the gradient corresponding to the ith squared error term including the ridge penalty .