AssertionError: Wrong values for pred. [[1. 0. 0.]] != [[1.0, 0.0, 1.0]]
getting this error, after prediction in exercise 7
Welcome to the community.
If we look at your output, the first data in an array is properly set to β1β. This means your algorithm to set Y_prediction based on A is working, at least. (it does not mean, it is correct. Itβs an assumption to go to the next step.) But, the 3rd data in an array does not have the right value, β1β.
Of course, there is a possibility to calculate βAβ wrongly, but, the first thing to do is to check the iteration number, i.e, loop count. If the range is not properly set, then, depending the shape, some data in Y_prediction is not updated.
1 Like
Thank you so much. I made a silly mistake thatβs why it was giving me wrong answer.