[MRG] Added input checks in `confusion_matrix`