Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC Ensures plot_precision_recall_curve passes the numpydoc validation #24403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

Kshitij68
Copy link
Contributor

Addresses #21350

This PR ensures plot_precision_recall_curve is compatible with numpydoc:

What does this implement/fix? Explain your changes.

Remove sklearn.metrics._plot.precision_recall_curve.plot_precision_recall_curve from DOCSTRING_IGNORE_LIST.
Verify that all tests are passing.

In #21547, and #22247 it was discussed about removing the depreciated docstrings to avoid the GL09 warning

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the same issue as for other plotting functions that are deprecated. We need to keep the function in the white list.

@@ -18,7 +18,6 @@
# 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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"sklearn.metrics._plot.det_curve.plot_det_curve",
"sklearn.metrics._plot.det_curve.plot_det_curve",
# sklearn.deprecation._update_doc is updating the doc against the numpydoc.
# See gh-24328.
"sklearn.metrics._plot.precision_recall_curve.plot_precision_recall_curve",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the comment

@@ -417,12 +417,6 @@ def plot_precision_recall_curve(

Read more in the :ref:`User Guide <precision_recall_f_measure_metrics>`.

.. deprecated:: 1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert this change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@glemaitre glemaitre changed the title Addresses #21350 DOC Ensures plot_precision_recall_curve passes the numpydoc validation Sep 9, 2022
@Kshitij68 Kshitij68 force-pushed the Fix-docstrings branch 2 times, most recently from 90f7773 to 013486c Compare September 9, 2022 10:44
@glemaitre
Copy link
Member

Thanks. I will merge once the CIs are green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants