def compute_cost(x, y, w, b):
m = x.shape[0]
cost = 0
for i in range(m):
f_wb = w * x[i] + b
cost = cost + (f_wb - y[i])**2
total_cost = 1 / (2 * m) * cost
return total_cost
def gradient_descent(x, y, w_in, b_in, alpha, num_iters, **cost_function**, gradient_function):
"""
Performs gradient descent to fit w,b. Updates w,b by taking
num_iters gradient steps with learning rate alpha
"""
then continue...
“cost_function” and “gradient_function” are functions in the code, I am not sure why we do not need to add arguments with parenthesis after the function name “cost_function”?