I think the image https://github.com/deeplearning540/lesson03/blob/main/images/screenshot_2021-02-23-confusion-matrix-wikipedia.png is not up to date maybe. https://en.wikipedia.org/wiki/Confusion_matrix uses y_true along axis 0 and y_pred along axis 1 in line with sklearn.