I think matrix indexes should be reversed:
hi @mbergal , welcome to the course! I see what you meant.
Actually the confusion matrix shown in the course and the one created by sklearn
have reverse axis for True label and predicted label.
And that’s why the code look reversed.
2 Likes
The axes are reversed so for the proportion of misclassified cats, we look from the X axis, at cats label, and compare it to the Y axis (true label). In this case, we predicted (364+3508+45) times and incorrectly classify cats (45 (true label is birds)+364 (true label is dogs)) times. The ratio thus is (364+45)/ (364+3508+45) = 0.1044
2 Likes