I have trained a model for handwritten digits multiclass classification using CNN in Keras. I am trying to evaluate the model with the same training images to get an estimate of the accuracy of the algorithm; however, when I evaluate the CNN confusion matrix, it gives a one column only of the form:
[[4132 0 0 0 0 0 0 0 0 0]
[4684 0 0 0 0 0 0 0 0 0]
[4177 0 0 0 0 0 0 0 0 0]
[4351 0 0 0 0 0 0 0 0 0]
[4072 0 0 0 0 0 0 0 0 0]
[3795 0 0 0 0 0 0 0 0 0]
[4137 0 0 0 0 0 0 0 0 0]
[4401 0 0 0 0 0 0 0 0 0]
[4063 0 0 0 0 0 0 0 0 0]
[4188 0 0 0 0 0 0 0 0 0]]
I guess the algorithm is giving the correct result since those are the total numbers of each digit in the database; however, the confusion matrix should give something like this:
[[4132 0 0 0 0 0 0 0 0 0]
[ 0 4684 0 0 0 0 0 0 0 0]
[ 0 0 4177 0 0 0 0 0 0 0]
[ 0 0 0 4351 0 0 0 0 0 0]
[ 0 0 0 0 4072 0 0 0 0 0]
[ 0 0 0 0 0 3795 0 0 0 0]
[ 0 0 0 0 0 0 4137 0 0 0]
[ 0 0 0 0 0 0 0 4401 0 0]
[ 0 0 0 0 0 0 0 0 4063 0]
[ 0 0 0 0 0 0 0 0 0 4188]]
The data can be taken from the "train.csv" file in this Kaggle project.
I would like to ask you guys what am I doing wrong in the code, such that I obtain this weird result.