generalizing confusion matrix
move confusion matrix to classifier
avoid mapreduce pattern in favor of foldLeft