begin confusion matrix integration