I wrote the gradientDescent function, and 2 out of 6 tests fail. However, I cannot understand what are the problems. The function has two output, J and theta, and when I run the pre-test, both are equal to the “expected output”. And yet when I test the function, I get "Wrong output for the loss function " and “Wrong values for weight’s matrix theta”. How can I fixed this? What are the tests exactly checking, given that my output coincides with the “expected output” for both function outputs?
I believed you tried number of different solutions and then you gave up. I just went in and uncommented your solutions which happen to be correct and everything is working fine. Sadly, I can’t tell were you went wrong, as the correct solution was already present in your notebook.
When you run the notebook now, you’ll see you’d pass the tests for that function.
Happy learning!
Mubsi