Guest User

Untitled

a guest
Jan 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. %% PLOT RECEIVER OPERATING CHARACTERISTIC (ROC)
  2. % ROC is a metric of classifier quality
  3.  
  4. simTRAIN = sim(net,TRAINMX);
  5. simTEST = sim(net,TESTMX);
  6.  
  7.  
  8. [TPR,FPR,THR] = roc(TRAINLAB,simTRAIN);
  9. % TPR : true-positive/positive ratios. (guess_case|is_case)/guess_case
  10. % FPR : false-positive/negative ratios. (guess_case|is_ctrl)/guess_ctrl
  11. % THR : thresholds over interval [0,1]
  12.  
  13. TPR = cell2mat(TPR');
  14. FPR = cell2mat(FPR');
  15. THR = cell2mat(THR');
  16.  
  17.  
  18. close all
  19. fh1=figure('Units','normalized','OuterPosition',[.1 .06 .6 .9],'Color','w');
  20. ax1 = axes('Position',[.1 .1 .8 .8],'Color','none'); hold on
  21. ph1 = plot(FPR',TPR','LineWidth',5);
  22. ph2 = line([0 1],[0 1],'Color','k','LineStyle','--');
  23. Pfilter=.01; box on; grid on
  24. title(['ROC P(num2str(Pfilter))=' num2str(size(TRAINMX,1)) ' variants'])
Add Comment
Please, Sign In to add comment