Hello, can you check if my values are wrong? I am using the suggested way of implementing the equation, the printed value seems the same the expected value but the traceback from the assertion statement in line 126 seems to be saying I need different output values.
Please look a little more closely at your cost value versus the “expected output” cost: there is a difference in the 3rd decimal place (0.692xxx vs 0.693xxx). That is not a rounding error: it is a real mistake in your code. That probably means you took the sample code they gave you literally as the complete solution. It’s not. Compare the code they gave you to the mathematical expression for the cost given above and ask yourself two questions:
What happened to the factor of 1/m?
Why is there only one term? What happened to the Y = 0 term?
damn you are right, I was too hasty and didn’t read the description well even though I remembered that the cost function equation is different. Thank you!