plotting confusion matrix and displaying errors