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

Skip to content

DOC Ensures that sklearn.metrics._classification.accuracy_score passes numpydoc validation #21441

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 5 commits into from
Oct 25, 2021

Conversation

embandera
Copy link
Contributor

@embandera embandera commented Oct 24, 2021

Reference Issues/PRs

Addresses #21350
#DataUmbrella

What does this implement/fix? Explain your changes.
This PR ensures sklearn.metrics._classification.accuracy_score is compatible with numpydoc:

  • Remove sklearn.metrics._classification.accuracy_score from DOCSTRING_IGNORE_LIST.
  • Verify that all tests are passing.

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.

Otherwise LGTM

Comment on lines 181 to 182
hamming_loss : Compute the average Hamming loss.
zero_one_loss : Zero-one classification loss.
Copy link
Member

Choose a reason for hiding this comment

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

Instead of the losses, I am thinking that it could be better to add the balanced_accuracy_score

Copy link
Member

Choose a reason for hiding this comment

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

I think hamming_loss and zero_one_loss are directly related to accuracy so this is fine to put them in the See also section for accuracy score. Maybe we could be slightly more explicit on how they are related.

+1 for adding balanced_accuracy_score.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM!

@glemaitre glemaitre merged commit 9eb6f11 into scikit-learn:main Oct 25, 2021
@glemaitre
Copy link
Member

Thanks @embandera

ogrisel pushed a commit to ogrisel/scikit-learn that referenced this pull request Oct 28, 2021
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Dec 24, 2021
glemaitre added a commit that referenced this pull request Dec 25, 2021
…s numpydoc validation (#21441)

Co-authored-by: Guillaume Lemaitre <[email protected]>
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.

4 participants