C1_W2_Linear_Regression assignment

Hello everyone, I am struggling with the code below. May I know is there any mistake I have made in below code ?

{mentor edit: code removed}

Hello @welweng_sieh, your calculations are not correct. You can look at the equation and try to implement that algorithm from hand on a small example. You will figure the error out.

1 Like

Please do not post your code on the forum. That’s against the community policy. I have edited your message.

Your code must sum the cost for each example. There is no summation in your code.