I have looked out for errors but could not find any and also I did apply sigmoid before prediction. This is the output text:
Output of predict: shape (4,), value [1. 1. 1. 1.]
ValueError Traceback (most recent call last)
in
9
10 # UNIT TESTS
—> 11 predict_test(predict)
~/work/public_tests.py in predict_test(target)
67 expected_1 = [1., 1., 1., 0., 1., 0., 0., 1.]
68 if np.allclose(result, wrong_1):
—> 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}"
ValueError: Did you apply the sigmoid before applying the threshold?