# Calculation of AUC value from ROC Curve

Is there any tool that can calculate the AUC value from a ROC curve if I already know how many samples are true positive, true negative, false positive, false negative out of 500 samples?

Specificity and sensitivity are also known to me.

• If you don't want to use R, this Python software is quite good too. To install it: pip install CROC. It will provide you with the croc-curve command. Try croc-curve --help to see how to use it. There is a scientific paper about it as well. Sep 21 '18 at 0:50

Edit: since you apparently do have scores and actual outcomes, you can calculate it. One tool that can do the job would be the pROC package in R. It contains an AUC function that takes as arguments the predicted scores and actual outcomes. Have a look at its documentation http://cran.r-project.org/web/packages/pROC/index.html

There is no such tool, because you lack necessary information. You need to have a score for each prediction as well as its true outcome. Without that kind of information, it is impossible to calculate AUC.

• Hello sir, i have a score for each prediction as well as its true outcome. Aug 1 '13 at 7:49
• That changes everything. I've edited my answer to reflect this. Aug 1 '13 at 8:01
• Thanx for the reply.It is advantageous to me.. Aug 1 '13 at 9:26
• Is there any tool present which perform same function as we discussed above. Aug 1 '13 at 18:26
• @user28681 by computing the confusion matrix (true|false positive|negative counts), you have basically lost the information to compute all possible confusion matrices. You can not possibly compute all the possible confusion matrices from one single confusion matrix. You need the predicted scores for that. Feb 28 '14 at 14:59