Skip to content

Commit f108e2a

Browse files
authored
DOC Fix cross references in LabelBinarizer (scikit-learn#26678)
1 parent b948fdb commit f108e2a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

sklearn/preprocessing/_label.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ class LabelBinarizer(TransformerMixin, BaseEstimator):
176176
At learning time, this simply consists in learning one regressor
177177
or binary classifier per class. In doing so, one needs to convert
178178
multi-class labels to binary labels (belong or does not belong
179-
to the class). LabelBinarizer makes this process easy with the
179+
to the class). `LabelBinarizer` makes this process easy with the
180180
transform method.
181181
182182
At prediction time, one assigns the class for which the corresponding
183-
model gave the greatest confidence. LabelBinarizer makes this easy
184-
with the inverse_transform method.
183+
model gave the greatest confidence. `LabelBinarizer` makes this easy
184+
with the :meth:`inverse_transform` method.
185185
186186
Read more in the :ref:`User Guide <preprocessing_targets>`.
187187
@@ -204,13 +204,13 @@ class LabelBinarizer(TransformerMixin, BaseEstimator):
204204
205205
y_type_ : str
206206
Represents the type of the target data as evaluated by
207-
utils.multiclass.type_of_target. Possible type are 'continuous',
208-
'continuous-multioutput', 'binary', 'multiclass',
207+
:func:`~sklearn.utils.multiclass.type_of_target`. Possible type are
208+
'continuous', 'continuous-multioutput', 'binary', 'multiclass',
209209
'multiclass-multioutput', 'multilabel-indicator', and 'unknown'.
210210
211211
sparse_input_ : bool
212-
True if the input data to transform is given as a sparse matrix, False
213-
otherwise.
212+
`True` if the input data to transform is given as a sparse matrix,
213+
`False` otherwise.
214214
215215
See Also
216216
--------
@@ -374,9 +374,9 @@ def inverse_transform(self, Y, threshold=None):
374374
threshold : float, default=None
375375
Threshold used in the binary and multi-label cases.
376376
377-
Use 0 when ``Y`` contains the output of decision_function
377+
Use 0 when ``Y`` contains the output of :term:`decision_function`
378378
(classifier).
379-
Use 0.5 when ``Y`` contains the output of predict_proba.
379+
Use 0.5 when ``Y`` contains the output of :term:`predict_proba`.
380380
381381
If None, the threshold is assumed to be half way between
382382
neg_label and pos_label.
@@ -389,10 +389,10 @@ def inverse_transform(self, Y, threshold=None):
389389
Notes
390390
-----
391391
In the case when the binary labels are fractional
392-
(probabilistic), inverse_transform chooses the class with the
392+
(probabilistic), :meth:`inverse_transform` chooses the class with the
393393
greatest value. Typically, this allows to use the output of a
394-
linear model's decision_function method directly as the input
395-
of inverse_transform.
394+
linear model's :term:`decision_function` method directly as the input
395+
of :meth:`inverse_transform`.
396396
"""
397397
check_is_fitted(self)
398398

0 commit comments

Comments
 (0)