C1 W3 assignment error

Hello,

I am getting error while executing unit test function compute_cost_test(compute_cost). It is giving below error.

AssertionError: Wrong output. Expected: 2.15510667 got: 2.75932426268233

Also, output of compute_cost is coming as 0.218 while expected output is 0.219

Its strange that compute_cost function is working well for me with Cost at initial w (zeros): 0.693

This notebook may have other issues as I was reading another post where it was mentioned that err variable was not needed there.

The expected output for me is 0.218

Here is my screenshot.

I’ve no clue. But you can check the solutions in the Lab Files (top right) to compare as well as the hints.

But yeah, the course is really new. As of right now the 3rd course of this ML specialisation, on Unsupervised Learning hasn’t been uploaded yet so there are bound to be some errors – re: typos and other weird little artifacts

Hey @sonubedi,
Welcome to the community. Can you please DM your notebook to me? For that, you may click on my name and select Message.

Regards,
Elemento

Kindly ignore this issue. I was using regularized term unnecessarily. There was lambda parameter given in the function definition which caused confusion.

1 Like

Hey @sonubedi,
Thanks for confirming that you have been able to solve the issue by yourself.

Regards,
Elemento