xrobin / pROC

Display and analyze ROC curves in R and S+
https://cran.r-project.org/web/packages/pROC/
GNU General Public License v3.0
121 stars 31 forks source link

Add auc method for data.frames #84

Closed jarauh closed 4 years ago

jarauh commented 4 years ago

The functions auc and roc basically need the same information to get their work done. However, the interfaces are slightly different: There is a method roc.data.frame, but the corresponding method auc.data.frame is missing.

xrobin commented 4 years ago

Thanks for your suggestion.

Actually I want to do exactly the opposite: remove the auc.formula and auc.default methods of auc (and plot, and ci, and all the other functions). The roc function, and only the roc function, should build a ROC curve.

See #70 for some preparation work in this direction.

Some reasons for that:

Basically if you have a data.frame and want to calculate an AUC, I currently believe you should do:

auc(roc(my.data.frame, response, predictor))

That's more explicit, and really if pROC was fully consistent throughout it wouldn't even be harder for the user.

Due to my current lack of time to work on this, and the scope of preparation work needed in #70, deprecating those methods is not going to happen soon though. Not even to mention removing them in a pROC 2.0 version.

Unless you have a strong argument in favor of this proposal, I'd close it as a wontfix.

jarauh commented 4 years ago

Well, I guess no strong argument here. My strongest argument is consistency, but it seems that you have it on your list already.

I'm usually interested in the auc, but not in the roc, so I would prefer to hide the roc away from my scripts. But of course, it suffices if one "direct" auc method (apart from auc.roc) survives your cleaning up.