Mercurial > hg > mauch-mirex-2010
annotate _FullBNT/KPMtools/plotROC.m @ 9:4ea6619cb3f5 tip
removed log files
author | matthiasm |
---|---|
date | Fri, 11 Apr 2014 15:55:11 +0100 |
parents | b5b38998ef3b |
children |
rev | line source |
---|---|
matthiasm@8 | 1 function [falseAlarmRate, detectionRate, area, th] = plotROC(confidence, testClass, col, varargin) |
matthiasm@8 | 2 % function [falseAlarmRate, detectionRate, area, th] = plotroc(confidence, testClass, color) |
matthiasm@8 | 3 |
matthiasm@8 | 4 if nargin < 3, col = []; end |
matthiasm@8 | 5 |
matthiasm@8 | 6 [scale01] = process_options(varargin, 'scale01', 1); |
matthiasm@8 | 7 |
matthiasm@8 | 8 [falseAlarmRate detectionRate area th] = computeROC(confidence, testClass); |
matthiasm@8 | 9 |
matthiasm@8 | 10 if ~isempty(col) |
matthiasm@8 | 11 h=plot(falseAlarmRate, detectionRate, [col '-']); |
matthiasm@8 | 12 %set(h, 'linewidth', 2); |
matthiasm@8 | 13 ex = 0.05*max(falseAlarmRate); |
matthiasm@8 | 14 ey = 0.05; |
matthiasm@8 | 15 if scale01 |
matthiasm@8 | 16 axis([0-ex max(falseAlarmRate)+ex 0-ey 1+ey]) |
matthiasm@8 | 17 else |
matthiasm@8 | 18 % zoom in on the top left corner |
matthiasm@8 | 19 axis([0-ex max(falseAlarmRate)*0.5+ex 0.5-ey 1+ey]) |
matthiasm@8 | 20 end |
matthiasm@8 | 21 grid on |
matthiasm@8 | 22 ylabel('detection rate') |
matthiasm@8 | 23 %xlabel('# false alarms') |
matthiasm@8 | 24 xlabel('false alarm rate') |
matthiasm@8 | 25 end |
matthiasm@8 | 26 |