I am getting AssertionError “perhaps you forgot to add the value of b in the calculation of A”
Hi @Salim.lawal it refers probably on the fact that b needs to be included in the calculation of A: as stated in excercise 7 introduction:
Hope this helps you out.
I checked my code and I am sure to have included b in my formula to calculate the value of A
Please show us the full output you get from the failing test case.
Ok, so the answers you are getting are incorrect. There are two possibilities:
- Your computation of the A value is incorrect.
- The way you translate A into the predictions is incorrect.
Let’s start by checking A. I added a print statement to show that and then I ran that test cell. Here’s what I get:
A = [[0.52241976 0.50960677 0.34597965]]
predictions = [[1. 1. 0.]]
predictions = [[1. 1. 0.]]
A = [[0.72445526 0.46920652 0.55395658]]
predictions = [[1. 0. 1.]]
All tests passed!
What values do you get for A?
You can see that there are two different test cases there. Let’s start with the first one for which you can see the input values in the notebook. If you want to see the inputs for the second test, you can click “File → Open” and then have a look at the file public_tests.py.
Thank you, I was able to solve it.
This was really helpful
[quote=“paulinpaloalto, post:6, topic:20111”]
A = [[0.52241976 0.50960677 0.34597965]]
predictions = [[1. 1. 0.]]
predictions = [[1. 1. 0.]]
A = [[0.72445526 0.46920652 0.55395658]]
predictions = [[1. 0. 1.]]
All tests passed!