Updated computation of confusion matrix.