Wrong definition of E in C2_W2_Assignment

In Coursera | Online Courses & Credentials From Top Educators. Join for Free | Coursera

Define cost function according to the equation (1)(1):

In [24]:

def E(m, b, X, Y):

return 1/(2*len(Y))np.sum(np.dot(mX + b - Y, X))

There shouldn’t be a dot product - that is for the dEdm

Thanks for reporting this, @toontalk!

@esanina, when you get some time, can you have a look at this? Thanks!


I have been stuck on that line of code from last 1 hour, where did that dot product came from. I think that dot product is there to square the values. But still cant understand why dot with ‘X’.
Was about to go over stackoverflow but decided to check here first.

Please resolve this

@toontalk @DietzscheNostoevsky sorry for confusion. It was a mistake in the code. We have fixed it now.

Its been updated. Thank you.