Skip to content
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

ci.cvAUC needs 0.5 for ties #6

Open
sgruber65 opened this issue Sep 9, 2020 · 5 comments · May be fixed by #11
Open

ci.cvAUC needs 0.5 for ties #6

sgruber65 opened this issue Sep 9, 2020 · 5 comments · May be fixed by #11
Assignees

Comments

@sgruber65
Copy link

Hi Erin,
The ROCR package's calculation of the AUC assigns 0.5 points for a tie. I was looking at your code for calculating the CIs, and saw that it ignores that possibility. Although people argue over strategies for dealing with ties, since the code is estimating the variance of the cv-AUC, as calculated by the ROCR package, it ought to respect the underlying calculation of the AUC.

DT[, :=(icVal, ifelse(label == pos, w1 * (fracNegLabelsWithSmallerPreds - auc), w0 * (fracPosLabelsWithLargerPreds - auc)))]

For some positive observation, i, this line will assign w1 * 1 to each negLabel earlier in the ordering, when for some subset of those it should possibly be w1 * 0.5. Also, there may be one or more negLabel observations immediately after i in the ordering that should be counted as 0.5, instead of 0. (Of course, similar logic applies to the negative label calculations.)

--Susan Gruber

@ledell
Copy link
Owner

ledell commented Jan 18, 2021

Thanks, @sgruber65, for pointing this out. Did you have a specific code fix in mind to resolve this?

Is there an easy way to identify which rows, i, should be w1 * 0.5 instead of w1 * 1.0? If so, then perhaps we can add a line of code right after the one above, which corrects the weights. It's been a long time since I wrote this code, so it would take me a while to get familiar with it again, in order to dig in deeper.

@sgruber65
Copy link
Author

sgruber65 commented Jan 19, 2021 via email

@sgruber65
Copy link
Author

sgruber65 commented Mar 4, 2021 via email

@ledell ledell self-assigned this Apr 27, 2021
@ledell ledell linked a pull request Apr 27, 2021 that will close this issue
3 tasks
@ledell
Copy link
Owner

ledell commented Apr 27, 2021

Hi @sgruber65 I am sorry for the delay on this -- i was locked out of my berkeley.edu email and so I had to sort that out before being able to update the package (since this package uses my old email and you can't update a package w/o access).

Thank you for providing the code! I think I can use the same code for the pooled version, as well.

I have opened a PR here with some remaining tasks noted: #11

@sgruber65
Copy link
Author

Thanks, Erin. And I agree, this should be the same for the pooled version.

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 a pull request may close this issue.

2 participants