Skip to content

Conversation

@theory-in-progress
Copy link
Contributor

  • In accordance with the Update of Scikit-Learn with version 1.1.1

Fixes #2850

Description:

  • The failure happens with Precision Recall Curve
  • This was an issue with scikit-learn which was resolved in their PR - FIX compute precision-recall at 100% recall
    • This was because precision_recall_curve() was not returning the full curve at high recall
    • Read more about the issue here
  • This Issue persisted Till now because scikit-learn==1.0.2 was being installed and the change in Precision Recall Curve was in version scikit-learn==1.1.1
  • Possible reason why this was happening - Python 3.7 was being used, when that changed and 3.7 was dropped from CI

Changes:

  • Updated the Doctests to match with Scikit-Learn

Old DocTest Returns:

Precision [1.0, 1.0, 1.0]
Recall [1.0, 0.5, 0.0]
Thresholds [0.7109, 0.9997]

Updated to New DocTest Returns:

Precision [0.5, 0.6667, 1.0, 1.0, 1.0]
Recall [1.0, 1.0, 1.0, 0.5, 0.0]
Thresholds [0.0474, 0.5987, 0.7109, 0.9997]

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

* In accordance with the Update of Scikit-Learn with version 1.1.1
@github-actions github-actions bot added the module: contrib Contrib module label Feb 9, 2023
@theory-in-progress theory-in-progress changed the title Update Doctest for precision_recall_curve.py (#2850) Update Doctest for precision_recall_curve.py Feb 9, 2023
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Thanks a lot @theory-in-progress !

@vfdev-5 vfdev-5 merged commit 5d344a0 into pytorch:master Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: contrib Contrib module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Doc test is failing

2 participants