Skip to content

Error in average_precision_score #9618

Closed

Description

@julj

According to Wikipedia, the average precision of the example below should be 0.5 instead of 0.25.

In [44]: y_true = np.array([0, 1, 0, 0, 0])
    ...: y_scores = np.array([0.7, 0.8, 0.5, 0.9, 0.1])
    ...: 

In [45]: print(average_precision_score(y_true, y_scores))
0.25

Activity

  1. jnothman commented on Aug 24, 2017

    @jnothman
    Member
  2. julj commented on Aug 24, 2017

    @julj
    Author

    It was 0.18.1, and it seems to be fixed in 0.19.0.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions