C3W3_Assignment excersise 04 Siamese model evaluation

Hi, now I am struggling with the excersise 04. Again, I think I do everything right, but I get the following results for accuracy and confusion matrix:

Accuracy 0.81064453125
Confusion matrix:
[[ 931 5451]
[1008 2850]]

Instead of

Accuracy ~0.725
Confusion matrix:
[[4876 1506]
[1300 2558]]

Is there a way, I could debug each element of this excersise?

Best,
Eleonora Kulberkyte

Try to use search tool with similar exercise name, you will find many threads address your issue, helping you debug.

if this doesn’t help, then send screenshot of your grade cell codes in question by personal DM.

Do not post codes here.

Regards
DP

hi @Eleonora_Kulberkyte

your cosine similarity requires correction, the below link should help you understand the error

Also please make sure your axis values are correct as per instructions mentioned, I am not saying it’s incorrect but go through the instructions before the grade cell once.

Regards
DP

1 Like

Alright, I got it right. The problem was the difference in matrix multiplication and pair-wise multiplication. I should have noticed those before! Thanks for your help!

2 Likes