Hi Im getting an error running the predict function and not sure where the problem lies:
my code:
{moderator edit: code removed}
Stack trace:
AssertionError Traceback (most recent call last)
in
9
10 # UNIT TESTS
—> 11 predict_test(predict)
~/work/public_tests.py in predict_test(target)
69 raise ValueError(“Did you apply the sigmoid before applying the threshold?”)
70 assert result.shape == (len(X),), f"Wrong length. Expected : {(len(X),)} got: {result.shape}"
—> 71 assert np.allclose(result, expected_1), f"Wrong output: Expected : {expected_1} got: {result}"
72
73 b = -1.7
AssertionError: Wrong output: Expected : [1.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0] got: [0. 0. 0. 0. 0. 0. 0. 1.]