receiver operating characteristic (roc) and area under the curve (AUC) in matlab


You want to use a classifier, for example a support vector machine, to distinguish between different classes. When making binary decisions you want to make sure that your decision criterion is sensitive to your target class and that it is specific to the target class. Say you want to detect cancer, but only cancer. That's why there are roc curves and the area under the curve.

I searched for implementations in matlab for calculating areas under the curve (auc) and found several, unfortunately, they had shortcomings. Some were incorrect. Most of them took the outcome of the decision criterion, Y, and the target vector, T, as input, which doesn't make sense, because the auc is a summary statistics not over just two vectors Y and T. The idea is that you take true positive rate (TPR) and false positive rate (FPR) from each {Y,T} pair and summarize over several runs of the decision criterion with different parameters.

Here is my implementation corresponding to Tom Fawcett's algorithm 3 in "roc graphs: notes and practical considerations for researchers, " 2004.



Here is how you get true positive rate and false positive rate (i assume you have T,Y element of {-1,1}:


Enjoy. Please comment below for any questions or suggestions.

No Response to "receiver operating characteristic (roc) and area under the curve (AUC) in matlab"

  Subscribe to replies to this post

 
This conversation is missing your voice. Your feedback is appreciated.
Post a Comment


You can use some HTML tags, such as <b>, <i>, <a>

If you see a message that says "your request could not be processed" press preview first and then post.
 
You can follow the discussion of this post by subscribing.


 
You are free to include information from this article on your own site if you provide a backlink. You can use the following markup:
<a href="http://www.myoutsourcedbrain.com/2008/11/receiver-operating-characteristic-roc.html">receiver operating characteristic (roc) and area under the curve (AUC) in matlab</a>