-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add roc_auc_survival()
#390
Conversation
Merge commit '4964156d7e2413cb0501357266501abb27652ad6' #Conflicts: # NEWS.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit hesitant to Approve as I'm not sure I have the expertise to give this a proper thumbs up, but everything looks fine to me!
R/surv-roc_survival_auc.R
Outdated
sensitivity <- sensitivity[not_na] | ||
specificity <- specificity[not_na] | ||
|
||
auc( 1 - specificity, sensitivity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels worth noting that a different pattern exists here:
Lines 212 to 219 in 4a620f3
sensitivity <- curve$sensitivity | |
specificity <- curve$specificity | |
auc( | |
x = specificity, | |
y = sensitivity, | |
na_rm = FALSE | |
) |
This is because direction = "minimize"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should have been "maximize"
😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still a bit confused here, then—if we want to maximize this metric, shouldn't we pass specificity
rather than 1 - specificity
, as in the code linked above? Or is the thing labeled specificity
actually one_minus_specificity
in the first place?
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com>
…into survival_curve_auc
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
This PR is based on #378, to supply the
roc_auc_survival()
metric.