Skip to content

Commit 63cd600

Browse files
DOC Typo in the error message of _binary_clf_curve (scikit-learn#15703)
1 parent c4733f4 commit 63cd600

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sklearn/metrics/_ranking.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ def _binary_clf_curve(y_true, y_score, pos_label=None, sample_weight=None):
539539
classes_repr = ", ".join(repr(c) for c in classes)
540540
raise ValueError("y_true takes value in {{{classes_repr}}} and "
541541
"pos_label is not specified: either make y_true "
542-
"take integer value in {{0, 1}} or {{-1, 1}} or "
542+
"take value in {{0, 1}} or {{-1, 1}} or "
543543
"pass pos_label explicitly.".format(
544544
classes_repr=classes_repr))
545545
elif pos_label is None:

sklearn/metrics/tests/test_ranking.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ def test_binary_clf_curve_implicit_pos_label(curve_func):
683683
# Check that using string class labels raises an informative
684684
# error for any supported string dtype:
685685
msg = ("y_true takes value in {'a', 'b'} and pos_label is "
686-
"not specified: either make y_true take integer "
686+
"not specified: either make y_true take "
687687
"value in {0, 1} or {-1, 1} or pass pos_label "
688688
"explicitly.")
689689
with pytest.raises(ValueError, match=msg):
@@ -695,7 +695,7 @@ def test_binary_clf_curve_implicit_pos_label(curve_func):
695695
# The error message is slightly different for bytes-encoded
696696
# class labels, but otherwise the behavior is the same:
697697
msg = ("y_true takes value in {b'a', b'b'} and pos_label is "
698-
"not specified: either make y_true take integer "
698+
"not specified: either make y_true take "
699699
"value in {0, 1} or {-1, 1} or pass pos_label "
700700
"explicitly.")
701701
with pytest.raises(ValueError, match=msg):

0 commit comments

Comments
 (0)