diff --git a/sklearn/metrics/metrics.py b/sklearn/metrics/metrics.py index c23c8c3410b06..c4408c99e0ade 100644 --- a/sklearn/metrics/metrics.py +++ b/sklearn/metrics/metrics.py @@ -165,14 +165,14 @@ def _check_clf_targets(y_true, y_pred): if type_true.startswith('multilabel'): if not type_pred.startswith('multilabel'): - raise ValueError("Can't handle mix of multilabel and multiclass " - "targets") + raise ValueError("Can't handle mix of multilabel and {0} " + "targets".format(type_pred)) if type_true != type_pred: raise ValueError("Can't handle mix of multilabel formats (label " "indicator matrix and sequence of sequences)") elif type_pred.startswith('multilabel'): - raise ValueError("Can't handle mix of multilabel and multiclass " - "targets") + raise ValueError("Can't handle mix of multilabel and {0} " + "targets".format(type_true)) elif (type_pred in ('multiclass', 'binary') and type_true in ('multiclass', 'binary')):