Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[MRG] Add multiclass support to average_precision_score #17388

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

Closed

Conversation

gbolmier
Copy link
Contributor

Reference Issues/PRs

Fixes #17104

What does this implement/fix? Explain your changes.

Add mean average precision score, the multi-class extension of average precision using OVR.

Any other comments?

average_precision_score handles the multilabel case by averaging each class scores according to the policy defined by the average parameter. The multiclass setting being a specific case of the multilabel one, it seems natural to add its support to average_precision_score. In an other hand we could also consider splitting the class scores average logic to a different metric named mean_average_precision_score

# More detailed explanatory text, if necessary. Wrap it to about 72
# characters or so. In some contexts, the first line is treated as the
# subject of the commit and the rest of the text as the body. The
# blank line separating the summary from the body is critical (unless
# you omit the body entirely); various tools like `log`, `shortlog`
# and `rebase` can get confused if you run the two together.

# Explain the problem that this commit is solving. Focus on why you
# are making this change as opposed to how (the code explains that).
# Are there side effects or other unintuitive consequences of this
# change? Here's the place to explain them.

# Further paragraphs come after blank lines.

#  - Bullet points are okay, too

#  - Typically a hyphen or asterisk is used for the bullet, preceded
#    by a single space, with blank lines in between, but conventions
#    vary here

# If you use an issue tracker, put references to them at the bottom,
# like this:

# Resolves: scikit-learn#123
# See also: scikit-learn#456, scikit-learn#789
# More detailed explanatory text, if necessary. Wrap it to about 72
# characters or so. In some contexts, the first line is treated as the
# subject of the commit and the rest of the text as the body. The
# blank line separating the summary from the body is critical (unless
# you omit the body entirely); various tools like `log`, `shortlog`
# and `rebase` can get confused if you run the two together.

# Explain the problem that this commit is solving. Focus on why you
# are making this change as opposed to how (the code explains that).
# Are there side effects or other unintuitive consequences of this
# change? Here's the place to explain them.

# Further paragraphs come after blank lines.

#  - Bullet points are okay, too

#  - Typically a hyphen or asterisk is used for the bullet, preceded
#    by a single space, with blank lines in between, but conventions
#    vary here

# If you use an issue tracker, put references to them at the bottom,
# like this:

# Resolves: scikit-learn#123
# See also: scikit-learn#456, scikit-learn#789
sklearn/metrics/_ranking.py Outdated Show resolved Hide resolved
sklearn/metrics/_ranking.py Outdated Show resolved Hide resolved
@gbolmier gbolmier changed the title [WIP] Add mean average precision score [MRG] Add multiclass support to average_precision_score Jun 26, 2020
@gbolmier
Copy link
Contributor Author

Should be fine to merge @amueller

@cmarmo
Copy link
Contributor

cmarmo commented Oct 20, 2020

Hi @gbolmier, sorry your pull request got lost. Are you still interested in finishing it? If so, do you mind fixing conflicts? Thanks a lot for your patience!

Base automatically changed from master to main January 22, 2021 10:52
@Scoodood
Copy link

Scoodood commented Feb 12, 2021

Just wondering, does anyone know when the multiclass support will be ready for average_precision_score()? This functionality is very much needed in Pycaret for multiclass dataset.

@gbolmier gbolmier requested a review from amueller February 15, 2021 17:17
@cmarmo
Copy link
Contributor

cmarmo commented Apr 26, 2021

Thanks @gbolmier for keeping the pull request synchronized. Failures are unrelated to the modifications. Perhaps @lorentzenchr could be interested in a review? Thanks!

@awinml
Copy link
Contributor

awinml commented Oct 27, 2022

@gbolmier As the PR has been marked as Stalled, I would like to take over and make the suggested changes.

@awinml
Copy link
Contributor

awinml commented Oct 27, 2022

/take

@gbolmier
Copy link
Contributor Author

Yeah sure @awinml, feel free to take over! From what I remember this PR needed review so I'm not sure it is a priority for the dev team. I would suggest asking them on gitter if it's worth taking over :)

@cmarmo cmarmo added Superseded PR has been replace by a newer PR and removed Stalled labels Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:metrics Superseded PR has been replace by a newer PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add mean_average_precision
5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.