you can find that the expected output (Cost at initial w: 75.203) is matching with the out put from the program. However, it is throwing assertion error that cost must be zero for correct prediction. Then I checked the compute_cost_test(target) code from “Public tests.py” file. I used the same inputs to run the program in my local compiler and it is perfectly returning “0” for cost value. If the expected output is coming correct then why it is not returning zero for the sample data set in compute_cost_test() function.
It is giving correct output for the inputs given in the exercise (cost at initial w: 75.02). Then the function is working correctly right? However, it is not working properly for the sample inputs given in “compute_cost_test(target)”. How is this possible?. Please help me with what I can do.
Double-check how you are implementing the compute_gradient function, especially dj_db. Check hints and more hints below that cell. The compute_cost_test(target) only calls your own compute_cost function.