From 37e2ffd7a1bd9f261d2c290f78afb151b5600a95 Mon Sep 17 00:00:00 2001 From: Maria Telenczuk Date: Sat, 3 Sep 2022 10:53:15 +0200 Subject: [PATCH] DOC Ensure plot_det_curve passes numpydoc validation (#24334) --- sklearn/metrics/_plot/det_curve.py | 12 ++++++------ sklearn/tests/test_docstrings.py | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sklearn/metrics/_plot/det_curve.py b/sklearn/metrics/_plot/det_curve.py index 92e84ce9b79..5b881a2b023 100644 --- a/sklearn/metrics/_plot/det_curve.py +++ b/sklearn/metrics/_plot/det_curve.py @@ -370,18 +370,18 @@ def plot_det_curve( ): """Plot detection error tradeoff (DET) curve. - Extra keyword arguments will be passed to matplotlib's `plot`. - - Read more in the :ref:`User Guide `. - - .. versionadded:: 0.24 - .. deprecated:: 1.0 `plot_det_curve` is deprecated in 1.0 and will be removed in 1.2. Use one of the following class methods: :func:`~sklearn.metrics.DetCurveDisplay.from_predictions` or :func:`~sklearn.metrics.DetCurveDisplay.from_estimator`. + Extra keyword arguments will be passed to matplotlib's `plot`. + + Read more in the :ref:`User Guide `. + + .. versionadded:: 0.24 + Parameters ---------- estimator : estimator instance diff --git a/sklearn/tests/test_docstrings.py b/sklearn/tests/test_docstrings.py index bc4a85b559d..069735136da 100644 --- a/sklearn/tests/test_docstrings.py +++ b/sklearn/tests/test_docstrings.py @@ -15,6 +15,8 @@ FUNCTION_DOCSTRING_IGNORE_LIST = [ "sklearn.decomposition._dict_learning.dict_learning", "sklearn.externals._packaging.version.parse", "sklearn.inspection._plot.partial_dependence.plot_partial_dependence", + # sklearn.deprecation._update_doc is updating the doc against the numpydoc. + # This will be fixed with issue: #24328 "sklearn.metrics._plot.det_curve.plot_det_curve", "sklearn.metrics._plot.precision_recall_curve.plot_precision_recall_curve", "sklearn.metrics._ranking.dcg_score",