dj_db: 0.12224734798757866
First few elements of regularized dj_dw:
[0.0024902811105698623, 0.0008310572821453981, -0.0003199128458138377, -0.0009249689453439485]
AssertionError Traceback (most recent call last)
in
11
12 # UNIT TESTS
—> 13 compute_gradient_reg_test(compute_gradient_reg)
~/work/public_tests.py in compute_gradient_reg_test(target)
122 dj_db, dj_dw = target(X, y, w, b, lambda_)
123
→ 124 assert np.isclose(dj_db, expected1[0]), f"Wrong dj_db. Expected: {expected1[0]} got: {dj_db}"
125 assert np.allclose(dj_dw, expected1[1]), f"Wrong dj_dw. Expected: {expected1[1]} got: {dj_dw}"
126
AssertionError: Wrong dj_db. Expected: -0.1506447567869257 got: 0.23003992576683766