wolffd@0: function [falseAlarmRate, detectionRate, area, th] = plotROC(confidence, testClass, col, varargin) wolffd@0: % function [falseAlarmRate, detectionRate, area, th] = plotroc(confidence, testClass, color) wolffd@0: wolffd@0: if nargin < 3, col = []; end wolffd@0: wolffd@0: [scale01] = process_options(varargin, 'scale01', 1); wolffd@0: wolffd@0: [falseAlarmRate detectionRate area th] = computeROC(confidence, testClass); wolffd@0: wolffd@0: if ~isempty(col) wolffd@0: h=plot(falseAlarmRate, detectionRate, [col '-']); wolffd@0: %set(h, 'linewidth', 2); wolffd@0: ex = 0.05*max(falseAlarmRate); wolffd@0: ey = 0.05; wolffd@0: if scale01 wolffd@0: axis([0-ex max(falseAlarmRate)+ex 0-ey 1+ey]) wolffd@0: else wolffd@0: % zoom in on the top left corner wolffd@0: axis([0-ex max(falseAlarmRate)*0.5+ex 0.5-ey 1+ey]) wolffd@0: end wolffd@0: grid on wolffd@0: ylabel('detection rate') wolffd@0: %xlabel('# false alarms') wolffd@0: xlabel('false alarm rate') wolffd@0: end wolffd@0: