Posted By

benjamin on 10/29/09


Tagged

matlab area the curve numerical under auc computing receiver operating characteristics roc


Versions (?)


Advertising

Website Promotion DIRECTORY is a crucial factor for all websites that need to gain better organic search engine rankings and increase website traffic.
Submitting your website as part of your Web Promotion strategy to our SEO friendly and high traffic Business Directory for review is an excellent way to gain a valuable backlink and increase your websites visibility online.

Submit Site


true positive rate and false positive rate for receiver operating characteristics (ROC) and area under the curve


Published in: MatLab 






URL: http://www.myoutsourcedbrain.com/2008/11/receiver-operating-characteristic-roc.html

i assume you have T,Y element of {-1,1}, see also my AUC function.

Expand | Embed | Plain Text
  1. function [TP,FP]=getfptp(T,Y)
  2. Y(Y>=0)=1;Y(Y<0)=-1; % target class (positive) is 1
  3. TP=sum( ( (Y==1) + (T==1) )==2 );
  4. FN=sum( ( (Y==-1) + (T==1) )==2 );
  5. FP=sum( ( (Y==1) + (T==-1) )==2 );
  6. TN=sum( ( (Y==-1) + (T==-1) )==2 );
  7. TP=TP/(TP+FN);
  8. FP=FP/(FP+TN);
  9. end

Report this snippet 

You need to login to post a comment.

Download royalty free graphics