Cost Function in Optional Lab

Hi,

I am bit confused with the cost function formula on the optional lab section

C1_W1_Lab03_Cost_function_Soln.ipynb/Cost-Function-Visualization–3D

CP = Cost of Point

Which is written as cost = 1/m *(CP1 + CP2 + … CPn)

But the lectures says J(w,b) = 1/2m Sum ( f(x^i) - y^i)2

What is the difference between these two ?

Regards,
Kamesh

I got the answer in subsequent modules when we derived the Gradient Descent on the cost function.

2 Likes