Skip to content

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
@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