Skip to content

Commit 4af26a7

Browse files
ArturoAmorQArturoAmorQ
and
ArturoAmorQ
authored
DOC Add missing directives to det_curve-related docstrings (scikit-learn#31225)
Co-authored-by: ArturoAmorQ <[email protected]>
1 parent 2f078bf commit 4af26a7

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

sklearn/metrics/_plot/det_curve.py

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ def from_estimator(
120120
from the previous or subsequent threshold. All points with the same
121121
tp value have the same `fnr` and thus same y coordinate.
122122
123+
.. versionadded:: 1.7
124+
123125
response_method : {'predict_proba', 'decision_function', 'auto'} \
124126
default='auto'
125127
Specifies whether to use :term:`predict_proba` or
@@ -227,6 +229,8 @@ def from_predictions(
227229
from the previous or subsequent threshold. All points with the same
228230
tp value have the same `fnr` and thus same y coordinate.
229231
232+
.. versionadded:: 1.7
233+
230234
pos_label : int, float, bool or str, default=None
231235
The label of the positive class. When `pos_label=None`, if `y_true`
232236
is in {-1, 1} or {0, 1}, `pos_label` is set to 1, otherwise an

sklearn/metrics/_ranking.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,11 @@ def det_curve(
334334
335335
thresholds : ndarray of shape (n_thresholds,)
336336
Decreasing thresholds on the decision function (either `predict_proba`
337-
or `decision_function`) used to compute FPR and FNR. An arbitrary
338-
threshold at infinity is added for the case `fpr=0` and `fnr=1`.
337+
or `decision_function`) used to compute FPR and FNR.
338+
339+
.. versionchanged:: 1.7
340+
An arbitrary threshold at infinity is added for the case `fpr=0`
341+
and `fnr=1`.
339342
340343
See Also
341344
--------

0 commit comments

Comments
 (0)