I am getting this error
51 dj_db, dj_dw = target(X, y, test_w, test_b)
52
—> 53 assert np.isclose(dj_db, 0.28936094), f"Wrong value for dj_db. Expected: {0.28936094} got: {dj_db}"
54 assert dj_dw.shape == test_w.shape, f"Wrong shape for dj_dw. Expected: {test_w.shape} got: {dj_dw.shape}"
55 assert np.allclose(dj_dw, [-0.11999166, 0.41498775, -0.71968405]), f"Wrong values for dj_dw. Got: {dj_dw}"
AssertionError: Wrong value for dj_db. Expected: 0.28936094 got: 0.309966650712056
the 1st cell is working fine but the second cell is giving error.
The test found an incorrect value for dj_db in your code.
I am unable to figure out the mistake in code ,the above cell is running fine. Can I send the code here ?
Please send it to me privately.
tom037
5
getting following error in my code for exercise 3 : File “”, line 24
err_i = f_wb_i - y[i]
^
SyntaxError: invalid syntax
TMosh
6
You replied on a thread that has been cold for two years. That’s not a recommended practice.
The syntax error is somewhere prior to the first character in the err_i = ...
line.
I’ll close this thread, since I think there is a duplicate topic I replied on yesterday.