Implement confusion matrix and calculate recall/precision