Be the first to rate this file! 5 Downloads (last 30 days) File Size: 3.07 KB File ID: #19468

AUROC - Area under Receiver Operating Characteristic

by Stefan Schroedl

 

05 Apr 2008 (Updated 07 Apr 2008)

Compute AUROC from frequency weighted instances of predictions and ratio of positive instances

| Watch this File

File Information
Description

The Area under the Receiver Operating Characteristic is a common summary statistic for the goodness of a predictor in a binary classification task. It is equal to the probability that a predictor will rank a randomly chosen positive instance higher than a randomly chosen negative one.

I was inspired by http://matlabdatamining.blogspot.com/2007/06/roc-curves-and-auc.html, which also provides good background information and discussion. However, in that implementation, for each case a pair (prediction, binary target) has to be explicitly enumerated. For large data sets, however, it is often more practical to group by predicted value, and specify number of repetitions and actual positive rate.

Example:
freq=100*rand(100,1);
act=(0.01:0.01:1)';
pred=min(max(act+rand(100,1),0),1);
auroc(pred,act,freq)

We supply a .cpp source file that has to be compiled into a mex file, and a .m file with the help information.

MATLAB release MATLAB 7.4 (R2007a)
Other requirements compilation tested under Linux.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
22 Feb 2010 Farzaneh

Excuse me, I can't understand that what the freq is. Could you help me?

25 Feb 2010 Meedo

the freq in the previous example is the score values that the SVM produced

Please login to add a comment or rating.
Updates
07 Apr 2008

resubmitting as zip file

Tag Activity for this File
Tag Applied By Date/Time
statistics Stefan Schroedl 22 Oct 2008 09:56:32
probability Stefan Schroedl 22 Oct 2008 09:56:32
auroc Stefan Schroedl 22 Oct 2008 09:56:32
auc Stefan Schroedl 22 Oct 2008 09:56:32
roc Stefan Schroedl 22 Oct 2008 09:56:32
receiver operating characteristic Stefan Schroedl 22 Oct 2008 09:56:32
classification Stefan Schroedl 22 Oct 2008 09:56:32

Contact us at files@mathworks.com