compute full confusion matrix