Skip to content

Commit ba187d4

Browse files
SabriDWglemaitre
andcommitted
DOC Fixed sklearn.preprocessing._label.label_binarize docstring (#24002)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
1 parent c0033ba commit ba187d4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

sklearn/preprocessing/_label.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,11 @@ def label_binarize(y, *, classes, neg_label=0, pos_label=1, sparse_output=False)
447447
Shape will be (n_samples, 1) for binary problems. Sparse matrix will
448448
be of CSR format.
449449
450+
See Also
451+
--------
452+
LabelBinarizer : Class used to wrap the functionality of label_binarize and
453+
allow for fitting to classes independently of the transform operation.
454+
450455
Examples
451456
--------
452457
>>> from sklearn.preprocessing import label_binarize
@@ -467,11 +472,6 @@ def label_binarize(y, *, classes, neg_label=0, pos_label=1, sparse_output=False)
467472
[0],
468473
[0],
469474
[1]])
470-
471-
See Also
472-
--------
473-
LabelBinarizer : Class used to wrap the functionality of label_binarize and
474-
allow for fitting to classes independently of the transform operation.
475475
"""
476476
if not isinstance(y, list):
477477
# XXX Workaround that will be removed when list of list format is

sklearn/tests/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"sklearn.metrics.pairwise.pairwise_distances_chunked",
4848
"sklearn.preprocessing._data.maxabs_scale",
4949
"sklearn.preprocessing._data.scale",
50-
"sklearn.preprocessing._label.label_binarize",
5150
"sklearn.svm._bounds.l1_min_c",
5251
"sklearn.tree._export.plot_tree",
5352
"sklearn.utils.axis0_safe_slice",

0 commit comments

Comments
 (0)