C3_W1_LabPart2_Exercise2_Error in answer?

I tried multiple times with the code in exercise 2 with tp (true positive) with predictions == 0, & y_val == 0, and fn (false negative) with predictions == 1, & y_val == 1. Shoudn’t this be correct? I completed the exercise with the values shown in the hint section, however I am very confused about them.

Hello Calvin @Calvin_M ,

y_val == 0 is a negative sample and when you predict predictions == 0 for it, you predict it correcly so it is a true negative. In contrast, y_val == 1 is a positive sample, and depending on what your prediction is, it can be either a true positive prediction or a false positive prediction. But I have to leave them to you to figure out.

Good luck!


Hello, I am closing this thread. If you have any followup, please open a new one.