MRG auc_score and average_precision_score. Closes issue #158. #1013

Merged
merged 4 commits into from Aug 15, 2012

Conversation

Projects
None yet
3 participants
@amueller
Member

amueller commented Aug 11, 2012

These are just convenience wrappers but should come in handy. Also @pprett wanted them ;)

sklearn/metrics/metrics.py
@@ -181,6 +181,57 @@ def roc_curve(y_true, y_score):
return fpr, tpr, thresholds[::-1]
+def average_precision_score(x, y):

This comment has been minimized.

@mblondel

mblondel Aug 14, 2012

Member

Should be y_true and y_score.

@mblondel

mblondel Aug 14, 2012

Member

Should be y_true and y_score.

sklearn/metrics/metrics.py
+ return auc(recall, precision)
+
+
+def auc_score(x, y):

This comment has been minimized.

@mblondel

mblondel Aug 14, 2012

Member

Same here.

@mblondel

mblondel Aug 14, 2012

Member

Same here.

@amueller

This comment has been minimized.

Show comment
Hide comment
@amueller

amueller Aug 14, 2012

Member

Fixed, thanks. (I have to many open PRs)

Member

amueller commented Aug 14, 2012

Fixed, thanks. (I have to many open PRs)

@mblondel

This comment has been minimized.

Show comment
Hide comment
@mblondel

mblondel Aug 14, 2012

Member

I would add a comment in auc along the lines of: this is a generic auc implementation, for the area under the roc curve, see auc_score. Also , I would add a reference (wikipedia, book or seminal paper if any) for each new function. Other than that +1 for merge.

Member

mblondel commented Aug 14, 2012

I would add a comment in auc along the lines of: this is a generic auc implementation, for the area under the roc curve, see auc_score. Also , I would add a reference (wikipedia, book or seminal paper if any) for each new function. Other than that +1 for merge.

@amueller

This comment has been minimized.

Show comment
Hide comment
@amueller

amueller Aug 14, 2012

Member

Done.

Member

amueller commented Aug 14, 2012

Done.

@agramfort

This comment has been minimized.

Show comment
Hide comment
@agramfort

agramfort Aug 15, 2012

Member

+1 for merge

Member

agramfort commented Aug 15, 2012

+1 for merge

amueller added a commit that referenced this pull request Aug 15, 2012

Merge pull request #1013 from amueller/auc_score
MRG auc_score and average_precision_score. Closes issue #158.

@amueller amueller merged commit 05dd59c into scikit-learn:master Aug 15, 2012

@amueller

This comment has been minimized.

Show comment
Hide comment
@amueller

amueller Aug 15, 2012

Member

Merged. Thanks for the reviews :)

Member

amueller commented Aug 15, 2012

Merged. Thanks for the reviews :)

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