Skip to content

Add auc_u_test to performance_metrics.py#128

Merged
kathyxchen merged 3 commits intoFunctionLab:masterfrom
bmacedo-lgtm:metrics
Dec 2, 2019
Merged

Add auc_u_test to performance_metrics.py#128
kathyxchen merged 3 commits intoFunctionLab:masterfrom
bmacedo-lgtm:metrics

Conversation

@bmacedo-lgtm
Copy link
Copy Markdown

@bmacedo-lgtm bmacedo-lgtm commented Nov 25, 2019

Reference Issues/PRs
Fixes #70. Adds new AUC calculation. The previously used implementation is sklearn's roc_auc_score, which is currently offered as the default metric.

What does this implement/fix? Explain your changes.
Offers a faster implementation of the AUC calculation. Based off of the following: https://blog.revolutionanalytics.com/2017/03/auc-meets-u-stat.html

What testing did you do to verify the changes in this PR?
Compared roc_auc_score to auc_u_test and confirmed that they calculate the same values up to the same precision. Also timed the methods and confirmed that this new implementation is about 10x faster.

@kathyxchen
Copy link
Copy Markdown
Collaborator

Hi @bmacedo-lgtm, thanks for this! :)

Could you fill out the PR template (just copy and paste the questions from here: #126) so that we have that information consistently across the pull requests?

Also, you can add me as a reviewer to this PR

@kathyxchen kathyxchen self-requested a review November 26, 2019 16:23
Comment thread selene_sdk/utils/performance_metrics.py Outdated
Comment thread selene_sdk/utils/performance_metrics.py Outdated
Comment thread selene_sdk/utils/performance_metrics.py Outdated
Comment thread selene_sdk/utils/performance_metrics.py
Comment thread selene_sdk/utils/performance_metrics.py Outdated
Comment thread selene_sdk/utils/performance_metrics.py Outdated
Copy link
Copy Markdown
Collaborator

@kathyxchen kathyxchen left a comment

Choose a reason for hiding this comment

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

@bmacedo-lgtm super super minor changes! I'm approving ahead of time - once you push the final edits it should be ready to go into master. Thanks a lot :) great job

Comment thread selene_sdk/utils/performance_metrics.py Outdated
Comment thread selene_sdk/utils/performance_metrics.py Outdated
from sklearn.metrics import roc_curve

from scipy.stats import rankdata

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

double check that there are 2 spaces between the import and the logger line?

Comment thread selene_sdk/utils/performance_metrics.py Outdated
@kathyxchen kathyxchen merged commit 22ec277 into FunctionLab:master Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add fast AUC computation that can be used during training

2 participants