annotate toolboxes/FullBNT-1.0.7/KPMtools/plotROC.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 function [falseAlarmRate, detectionRate, area, th] = plotROC(confidence, testClass, col, varargin)
wolffd@0 2 % function [falseAlarmRate, detectionRate, area, th] = plotroc(confidence, testClass, color)
wolffd@0 3
wolffd@0 4 if nargin < 3, col = []; end
wolffd@0 5
wolffd@0 6 [scale01] = process_options(varargin, 'scale01', 1);
wolffd@0 7
wolffd@0 8 [falseAlarmRate detectionRate area th] = computeROC(confidence, testClass);
wolffd@0 9
wolffd@0 10 if ~isempty(col)
wolffd@0 11 h=plot(falseAlarmRate, detectionRate, [col '-']);
wolffd@0 12 %set(h, 'linewidth', 2);
wolffd@0 13 ex = 0.05*max(falseAlarmRate);
wolffd@0 14 ey = 0.05;
wolffd@0 15 if scale01
wolffd@0 16 axis([0-ex max(falseAlarmRate)+ex 0-ey 1+ey])
wolffd@0 17 else
wolffd@0 18 % zoom in on the top left corner
wolffd@0 19 axis([0-ex max(falseAlarmRate)*0.5+ex 0.5-ey 1+ey])
wolffd@0 20 end
wolffd@0 21 grid on
wolffd@0 22 ylabel('detection rate')
wolffd@0 23 %xlabel('# false alarms')
wolffd@0 24 xlabel('false alarm rate')
wolffd@0 25 end
wolffd@0 26