=====Area under the Receiver Operating Characteristic (AUROC)===== 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)