Add auc_u_test to performance_metrics.py#128
Merged
kathyxchen merged 3 commits intoFunctionLab:masterfrom Dec 2, 2019
bmacedo-lgtm:metrics
Merged
Add auc_u_test to performance_metrics.py#128kathyxchen merged 3 commits intoFunctionLab:masterfrom bmacedo-lgtm:metrics
auc_u_test to performance_metrics.py#128kathyxchen merged 3 commits intoFunctionLab:masterfrom
bmacedo-lgtm:metrics
Conversation
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
requested changes
Nov 26, 2019
kathyxchen
approved these changes
Nov 27, 2019
Collaborator
kathyxchen
left a comment
There was a problem hiding this comment.
@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
| from sklearn.metrics import roc_curve | ||
|
|
||
| from scipy.stats import rankdata | ||
|
|
Collaborator
There was a problem hiding this comment.
double check that there are 2 spaces between the import and the logger line?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_scoretoauc_u_testand 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.