-
Notifications
You must be signed in to change notification settings - Fork 31
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
Implement the approach from Hand & Till for generalization the AUC to the multi-class setting #37
Conversation
… the multi-class setting
Codecov Report
@@ Coverage Diff @@
## master #37 +/- ##
==========================================
- Coverage 46.41% 45.47% -0.94%
==========================================
Files 33 33
Lines 3342 3411 +69
==========================================
Hits 1551 1551
- Misses 1791 1860 +69
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #37 +/- ##
=========================================
- Coverage 46.41% 45.7% -0.71%
=========================================
Files 33 33
Lines 3342 3394 +52
=========================================
Hits 1551 1551
- Misses 1791 1843 +52
Continue to review full report at Codecov.
|
Thank you Matthias.
In addition I was wondering: the |
…oxygen from description
Thanks for the review 👍 Indeed, I think that A(i|j) is an AUC value. Thus, I replaced the conditional calculation from before with the call to There are two problems remaining:
|
…ion set to auto and use of direction > by default
I've just fixed the second problem. In the multiclass setting using direction = "auto" (the default) leads to inconsistent decision rules. Now, I am enforcing direction = ">" if direction = "auto" was set to ensure that the results are consistent for multiple calls of |
Due to some tight deadlines here I haven't had time to really look into this, and probably won't for the next two weeks I'm afraid. But I will be able to do that after Christmas. The Travis builds are failing due to some small issues in the help file. If you have a chance to look into it that would be great, otherwise I'll do it once the branch is merged. |
Right, I just saw that I forgot to document the direction parameter, which I added. Fixed that. No problem, I know those kind of deadlines. I wish you a lot of success and a nice christmas! |
I merged into a new branch You are correct with point 1), this is not a I checked and the The only other method I could find that consumes a Re point 2) indeed you need to fix the direction. In the bootstrap operations I fix it with the direction obtained on the main ROC curve. I'm not sure if that would make sense here, or if it would even make a difference as you calculate both A(i|j) and A(j|i) anyway. |
Quick update. I have started to implement the new class for the new multivariate ROC and AUC (see multiclass-hand-till branch). I called it mv.multiclass.roc and mv.multiclass.auc. Re. the I still need to implement:
We need to specify/document:
Finally I'd like to add a few testthat unit tests:
Once all that is done I can merge into master and prepare a release. |
I've been implementing and testing the functions above. Pretty happy so far.
The CI is broken, and has been so for a while for univariate multiclass.roc for a while a believe. See issue #38. I'll have a look at it later and see if I can implement CI for the new mv.multiclass.roc at the same time. |
Formulas worked pretty easily. I found a few other issues along the way which were fixed. I'd still want to look at the behavior upon invalid/incomplete data and make sure it is consistent with the other functions of the package, and then I'll be able to merge into the master branch and prepare for the release. |
The code is now available in the main master branch. Thanks for it! |
I've implement the approach from Hand & Till for generalizing the AUC to the multi-class setting by adjusting the
multiclass.roc
function. For individual decision values, it still works as before since I'm simply calling the original version of the function. For multivariate decision values, I added a new implementation according to the paper from 2001. Note that for matrix input, the function does not support the additional arguments. I've adjusted the raw R documentation accordingly since I couldn't find any roxygen comments.